Methods for Generating PDF from HTML content on a webserver.
HTMLDOC
Since we are focused on Linux / OSX / SOLARIS and other POSIX based operating systems, and C++, HTMLDOC seems to be the first and easiest choice for doing PDF conversion, and it works pretty well, and there is BETA that now handles CSS. It is probably already loaded on most LINUX distros. You can load the source and compile it from www.htmldoc.org. There is also a commercial version.PROOF OF CONCEPT OF A DIFFERENT APPROACH
- Servers side instance of Gecko Layout Engine gets server generated HTML
- Gecko Chrome is PS Print driver with emmision to file named by UUID generator.
- Invoke ps2pdf UUID.ps UUID.pdf
- delete UUID.ps
- if (valid UUID.pdf) then
- send http header with pdf mime type back to browser
- send UUID.pdf content to browser.
- else
- send error message to browser
- end if
- delete UUIDGEN.pdf
I have tested this approach on Fedora Core 4 by:
- Manually calling up a styled page ( bluerobot.com css page )
- Sent the page to the postcript printer (to file option).
- I then manually invoked ps2pdf
I will post the code here when I have completed this project.
