

Convert HTML to PDF in PHP (libwkhtmltox extension) - matticakes
http://blog.perplexedlabs.com/2010/09/15/convert-html-to-pdf-in-php-libwkhtmltox-extension/

======
DanHulton
Man, I LOVE wkhtmltopdf. It's an excellent, quick-n-dirty way to get your site
into a PDF. There's some caveats, though:

\- Want to do columns? You're screwed! It uses WebKit as the rendering engine,
so any columns you specify will go WELL past the page break before they wrap,
and looking HORRIFYIN'.

\- If your fonts aren't set up perfectly, expect some super-ugly text
(jaggies, etc).

\- You will have to play with it for quite a while if you want to do anything
fancy with headers, and you'll likely have to settle for something less
ambitious than you started with.

\- Have Unicode in your source HTML files? Hope you're comfortable with how
that all works, or are cool with transliteralisation. Or cool with all kinds
of #?^s through your files.

For anything heavy-duty, I'd recommend biting the bullet and using FPDF or a
heavy-duty PDF creation library. But for quick and easy, wkhtmltopdf is
excellent.

~~~
matticakes
Sure, it's certainly not perfect. In the cases where I've used it the benefits
far far outweigh the negatives you've pointed out.

I feel like you need to enter with an open mind for any conversion to PDF...

------
poundy
I wonder how the Nytimes front page will be converted.

~~~
matticakes
Not bad (this done without specifying any options which might improve
conversion)...

<http://www.visionaryrenesis.com/nytimes.pdf>

------
vineet7kumar
I have used MPDF given the limitations of the shared server I am using. But I
would definitely give a try to your extension.

