StyledText to pdf

I have two approaches:

  1. StyledText.RTFData and use a webservice for convert to PDF like (http://convert.no-ip.biz/), the problem is HTTP/1.1 and the clients are not always connected (weird!!)

  2. Use pure xojo code, I’m playing with this project but with problems, mostly when a paragraph have alignment (right, center) and more than one style.

Any idea? or is there another way to do this?

PD: I tried with DynaPDF but you had to write much code, with same problems, no easy way …?

Thanks so much in advance.

You might also check out the command line tool, wkhtmltopdf. I wrote an article for xDev on how to use it:

http://www.xdevmag.com/browse/11.1/11107/

It converts from HTML, but I’m sure you can find a StyleText to HTML converter (or write your own).

If you have existing StyledText data you can load it into Styled HTML Field from BKeeney and get the HTML back out of that.

I don't know the source of the styled text, but if your users are creating it and editing it you could try [url=http://timi.me/htmledit.html]HTML Edit[/url] which emulates a rich text area, comes with the toolbar, and gives you HTML output that you could shove into wkhtmltopdf mentioned above.

I have not used or looked at the wkthmltopdf command line tool, so I don’t know what the combos I’ve mentioned might look like when they’re done. I’m always around to help with my controls though :smiley:

[quote=164664:@Tim Parnell]If you have existing StyledText data you can load it into Styled HTML Field from BKeeney and get the HTML back out of that.
[/quote]

That sounds great, I had not thought of it that way. I’ll try with wkhtmltopdf too.

Thanks.

I once made example project for DynaPDF: Create PDF with text styles.rbp
It converts StyledText to DynaPDF’s formatting commands.