Hi,
Does anyone know if it is possible to output a Formatted Text Control’s content as a pdf file?
I have downloaded the FTC demo from www.bkeeney.com, but there is no pdf output option - so I’m presuming it’s not possible natively.
However, I already own DynaPDF from MBS, so I was wondering if anyone had successfully converted an FTC’s content to pdf.
FTC can export to rtf and html. Can DynaPDF nowadays convert one of these to PDF? I’m printing directly from html to PDF with the html-viewer. That’s a function that’s also in MBS. Then I add page numbers, headers and footers.
HTML to PDF is a feature of WebKit on Mac which you can use with our plugin.
Also RTF to PDF may be possible via loading it into a NSTextView, but you may loose a couple of features.
Maybe they have plans to add an output option for PDF via DynaPDF.
Would require to translate calls to graphics into calls to DynaPDF, e.g. via DynaPDFGraphics class in one of the samples.
FTC does not have that currently. It’s a long term plan to add it and there has been some work done on it but it’s not nearly ready for testing or release. If I were pressed to come out with something soon it would have to use the MBS DynaPDF plugin.
Richard, of course you must know of http://wkhtmltopdf.org (free for Mac, Win and Linux).
I create a temporary HTML file with HTML formatted text plus embedded ChartDirector charts, then convert it to PDF using wkhtmltopdf, then display the resulting PDF in an HTMLViewer for my WebApps.
PDF is never fun. As programming language it’s as complicated as Xojo. If you go the html route you need to remember that loading html in a thread crashes the app. wkhtmltopdf is rather large. For MBS creating the pdf is very simple:
dim tempItem as FolderItem = getTempFolderitem
call HTMLViewer1.PrintToPDFFileMBS(tempItem, 50, 50, 50, 50)
[quote=196489:@Beatrix Willius]PDF is never fun. As programming language it’s as complicated as Xojo. If you go the html route you need to remember that loading html in a thread crashes the app. wkhtmltopdf is rather large. For MBS creating the pdf is very simple:
dim tempItem as FolderItem = getTempFolderitem
call HTMLViewer1.PrintToPDFFileMBS(tempItem, 50, 50, 50, 50)[/quote]
This works really well.