views:

988

answers:

4

I am looking for a redistributable component to convert HTML to PDF.

I would - at the moment - like to avoid using a "PDF printer", as this requires a printer installation and some user "playing around" in the printers panel might break that feature.

The HTML is available in a Browser control or as external file. The HTML is normally fairly simple, but customers can create their own templates, so a "good range" of HTML should be supported.

Should be accessible for an automated process from C++ - DLL / COM / external executable with command line support are all fine.

Commercial is fine, but in the thousands is not an option right now.

So, which components do you know or can you recommend?

A: 

Hi,

you might want to have a look at PDFReactor: http://www.realobjects.com/PDFreactor.808.0.html

Regards, divo

0xA3
+1  A: 

This might be a slightly clumsy route, but why not convert the HTML to LaTeX source (html2latex is freely available) and then run the result through PDFLaTeX (which, of course, is also freely available)?

Tom
A: 

If you have Microsoft Word installed, I guess you could automate the whole process using the "save as pdf" plugin that can be downloaded from the Microsoft Office Site.

You would automate word then open the HTML document inside word, then output as PDF. Might be worth a shot, if you're developing in a Microsoft Environment.

Michael L
+1  A: 

PDFCreator can function as a virtual printer but it's also usable via COM. The default setup even includes COM examples.

You can check the COM samples in the SourceForge SVN repository right here: http://pdfcreator.svn.sourceforge.net/viewvc/pdfcreator/trunk/COM/

Mihai Limbășan
I wanted to avoid "PDF printers", but finally we ended up with nuging PDFCreator to do what we need.
peterchen