TrojanName
TrojanName

Reputation: 5355

command line tool for generating pdfs from various document types?

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".

Upvotes: 1

Views: 12049

Answers (4)

TrojanName
TrojanName

Reputation: 5355

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.

Upvotes: 3

geekosaur
geekosaur

Reputation: 61369

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.)

Upvotes: 1

Ash
Ash

Reputation: 62096

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.

Upvotes: 0

Chathuranga Chandrasekara
Chathuranga Chandrasekara

Reputation: 20906

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

PDF Creator

Upvotes: 0

Related Questions