NYCPHP Meetup

NYPHP.org

[nycphp-talk] html to PDF conversion?

Rob Marscher rmarscher at beaffinitive.com
Fri Mar 5 10:52:05 EST 2010


> On Fri, Mar 5, 2010 at 3:07 AM, David Roth <davidalanroth at gmail.com> wrote:
>> I'm looking for a command-line way to convert HTML to a PDF on CentOS 5.4,
>> because I need to do this in a shell script to create the webpage as a .PDF
>> file.

Prince XML has a free non-commercial license:
http://www.princexml.com/overview/

I recently read an article on alistapart.com that mentioned it.  I'm not sure exactly what system libraries might be needed - it installed with little effort on my mac.

I compared it side by side with wkhtmltopdf.  wkhtmltopdf produced a better version of the site I pointed it at.  Looks like Prince has some more options though - like passing in your own stylesheets and working with xml in addition to html.




More information about the talk mailing list