News for hackers. Stuff that matters.
Re:Ask HN: Is PDF generation a real pain for developers? by subsection1h on Sunday April 28, 2013 @11:53PM (#5623977)

    It is tedious to code the layout and design of the
    PDF using code libraries such as FPDF, Prawn etc.
I recently used Prince[1] to generate a PDF version of a web-based book. The PDF needed to be suitable for professional printing (crop marks, bleed, trim, etc.). Prince was the only solution I could find that came even close to being adequate for the job, and it exceeded my expectations. Creating the HTML for Prince wasn't tedious at all. It was almost a pleasure because Prince includes better support for print-related CSS3 properties than any rendering engine I've encountered. There's a web-based service named DocRaptor[2] that is powered by Prince.

[1] http://www.princexml.com/

[2] http://docraptor.com/

Re:Ask HN: Is PDF generation a real pain for developers? by usladha on Monday April 29, 2013 @05:26AM (#5624975)
Hi,

You can try using FlyingSaucer (https://code.google.com/p/flying-saucer/) It takes in HTML and gives PDF. It also supports print related CSS3 properties and its open source. May be it cannot compete with Prince, but it is a good open source alternative

Re:Ask HN: Is PDF generation a real pain for developers? by ashokvarma2 on Monday April 29, 2013 @09:21AM (#5625929)
PrinceXML doesn't support a lot of the Html5 and CSS3. Canvas support doesnt exist, so I cant print charts.
Re:Ask HN: Is PDF generation a real pain for developers? by usladha on Monday April 29, 2013 @02:22PM (#5627786)
I havent tried charts with princexml, but flying-saucer has capability to do custom rendering. So if you want, you can use a service to get image of your chart and then render that in the pdf as image.
Re:Ask HN: Is PDF generation a real pain for developers? by knkella on Tuesday April 30, 2013 @01:50AM (#5630603)
Our service has built in charts support. Check out Pagify and let me if it is something you will use?