Plain text to PDF

Exporting to PDF is only possible thru external plugins ? right ?

I need to export (save as) plain text, very simple stuff. No images.
Any suggestions ? thanks


On OS X just use System’s “Print to PDF”. I f you need Cross-Platform-Compatibility, you could use the PDF Plugin by @Björn Eiríksson f.e.

Windows 10 also offers “print to PDF”. Earlier versions do not have this feature.

Other options include MBS DynaPDF and Debenu PDF Library. Debenu is on the expensive side, but if your requirements are simple, the lite version is free. I have used MBS DynaPDF and Debenu with Xojo applications successfully. There are also classes that can be used with Xojo. You will surely be able to find references to them on the forum.

On OS X, there is also TextUtil.

More about TextUtil on OS X in this blog post: Convert Text Files to Different Formats

And MBS DynaPDF Plugin is also an option:

currently on sale via Xojo store. And you need only a starter.

That example is wrong in so many ways…
PDF is a structured linked indexed document where each object must be properly defined, and must point exactly at the objects it needs to be linked to. Perhaps a brute force approach “might” work, but it would be super fragile, and mostly rejected by any PDF reader that properly imposes the PDF protocols.

Ah, you know how i can add a hyperlink to it (the ugly way)?

with PDF there is no “ugly way”… you follow the PDF specifications to the letter, or you risk having your document become corrupt.

If you’re talking about links on the forum, you don’t have to use the link button if you paste a regular url in.

I was meaning a hyperlink into the pdf document… but thx.
Somebody else a tip/link ?

Have you even attempted to READ the PDF specifications?
You do it right, or you risk not doing it at all…

That being said… I’m going to stop beating this dead horse

I’ve had success with wkhtmltopdf in the past, on both Mac and PC. You feed it an HTML page; it spits out a PDF. It’s a command line program. It supports tags so you can embed hyperlinks. has full info, downloads etc.

FYI… PDF is not a valid output format for TextUtil

[quote] fmt is one of: txt, html, rtf, rtfd, doc, docx, wordml,
odt, or webarchive[/quote]

Heh. You’re absolutely right.

Since I have tons of free time … (still seeking employment :frowning: )
I decided to take on this challenge… based on code from my incomplete gPDF project

It will take plain “text” and convert it to a PDF file… with an option to use selected Markup (ie. HTML tags)

Those tags will be , , , ,


will be used to denote a pagebreak will support COLOR, SIZE and FACE (where FACE must be a PDF14 named font Other HTML tags, or attributes to the above tags that are not supported will be ignored. Data in an HTML section will be completely discarded

You will also be able to tell it to NOT process the tags, and the tags will appear in the output text

This will be for TEXT ONLY… no graphics, drawing etc…