Re:Wkhtmltopdf, shell utility to convert html to pdf using w...
by drothlis on Monday April 16, 2012 @07:38AM
(#3846927)
Not to mention that Prince XML has excellent support for CSS paged media (margins, page breaks, headers & footers, etc). Contrast with the printed output of any major browser -- they're all quite disappointing.
It would be nice if that $3800 included free upgrades to subsequent releases, though...
Re:Wkhtmltopdf, shell utility to convert html to pdf using w...
by solutionyogi on Monday April 16, 2012 @01:31PM
(#3848375)
+1 for Prince XML.
Ryan Tomayko (a githubber) is extremely impressed. And when Ryan (or any other community respected hacker) is impressed, I can use that product without any further thinking.
http://tomayko.com/writings/princexml
If you are on .NET, I also recommend Essential Objects PDF library (http://www.essentialobjects.com/Products/EOPdf/Default.aspx). I have been using it for a production project and it is rock solid. At 549$/developer, it is much more affordable.
Re:Wkhtmltopdf, shell utility to convert html to pdf using w...
by mike-cardwell on Monday April 16, 2012 @07:18AM
(#3846882)
I used wkhtmltopdf in a previous project and found it to be extremely reliable and easy to use. I was extracting the HTML mime parts from incoming email, converting them to PDFs with wkhtmltopdf, then converting that to a PNG with ImageMagick and displaying the PNG to the user in a web browser.
Re:Wkhtmltopdf, shell utility to convert html to pdf using w...
by pbhjpbhj on Monday April 16, 2012 @08:32AM
(#3847058)
Why bother with the intermediate stage and not go direct html-to-png?
Re:Wkhtmltopdf, shell utility to convert html to pdf using w...
by mike-cardwell on Monday April 16, 2012 @09:00AM
(#3847147)
Originally because I didn't find a free app which would do that. Then I decided to keep the PDF as it was quite useful. Unlike with the PNG, the HTML links were retained in the PDF. Ie, HTML anchor tags are still clickable in PDFs generated by wkhtmltopdf.
EDIT: A PDF will also let you select text, unlike an image. However, an image is nicer to embed in a webpage. So I utilised both in order to get the best of both worlds.
Re:Wkhtmltopdf, shell utility to convert html to pdf using w...
by blakeeb on Monday April 16, 2012 @10:39AM
(#3847519)
Oops just noticed this comment. See my other comment (wkhtmltoimage is part of the package, allows you to render HTML+CSS into PNG, compile into x64 and place binary in your git repo directory to use on heroku)
At the time the hands down winner was Prince XML [2]. It's relatively expensive ($3800 for a single server license) but it just works, works from many languages and produces beautiful results quickly (look at their samples). It doesn't take a lot of developer time to make up that purchase cost.
I haven't checked out this particular project but with the others I have they tended to work for smaller samples but would die, take forever or have unpredictable results on even moderately large documents (~150k).
For any commercial project, honestly I'd just fork over the $3800 for Prince without hesitation. It's simply that good.
EDIT: actually, looking over the SO question I think I did check out an early version of this project and didn't have much success with it. The one thing that concerns me about this project now is the last news item is over a year old. Is it still being actively maintained?
[1]: http://stackoverflow.com/questions/391005/convert-html-css-t...
[2]: http://princexml.com/