Question

I'm looking for ways to generate pdfs on-the-fly preferably using a command line tool as this will be done from a web-based system.

My requirements include must work on Windows and Linux, should be able to convert Microsoft Word, Excel and HTML into PDF.

Also the ability to concatenate or merge various documents into one PDF output file would be good.

Any suggestions? I would prefer to avoid applications that work as "printer drivers".

many thanks

Was it helpful?

Solution

After doing some research, the best solution I found in the end that could handle all the file formats we needed converting, plus which ran on Linux and Windows was a beautifully elegant lightweight Python script called PyODConverter. This uses OpenOffice (which itself runs in server mode) to do the actual conversions, and it really works beautifully. I used a separate tool called PDFTK to do the PDF concatenation, as I found that ImageMagick loses a lot of information (and creates huge file sizes).

If you find PyODConverter too limited, there is also a more powerful heavyweight option written by the same guy called JODConverter.

OTHER TIPS

Calibre runs on Linux, Windows, and Mac OS X and has command line tools on all three. It can translate a great many document types to PDF and other formats.

(Disclaimer: I'm a heavy user, help out on Calibre's IRC channel, and have been poking at development, so I'm just a bit biased.)

I think this has a command line utility, but not sure. Check this

PDF Creator

Have a look at biopdf, and a PDF printer that uses it called Bullzip PDF. Check the documentation for Bullzip PDF for examples on how it can be automated. It has an API interface as well as the GUI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top