Prince: XML + CSS = PDF

Nov 28

Prince: XML + CSS = PDF

Prince: Overview: There’s a big gap in getting Web content into print.

I’ve had to cross the gap a couple times, and I’ve both generated PDFs server-side and used CSS to style HTML into printable format. Both methods suck.

Prince is a system that lets you take XML, style it with CSS, and then generate a PDF. It’s very good — I’ve seen demos, and their site is full of them. Look at the image with this post — that’s HTML converted to PDF, unattended.

But it’s still expensive — $3,800 for a server license? Ouch.

Prince is a computer program that converts XML into PDF documents. Prince can read many XML formats, including XHTML and SVG. Prince formats documents according to style sheets written in CSS.

What are the free alternatives? It’s a pretty bare field. There’s XML:FO, but I never had much luck with that (and I detest XSL, which doesn’t help). Recently, I was impressed with FPDF, which is a PHP class that will generate simple PDFs from HTML.

Via A List Apart which has a whole article on the problem.


Comments

by ,   November 29, 2005 8:05 AM  

Not free, but cheaper is CeTe Software's DynamicPDF Generator: http://www.cete.com/Products/GeneratorForNET/

We paid under $600 for our server license.


by Noel,   November 30, 2005 9:47 AM  

I am working on a project where we have letter templates in XSL:FO and merge the data using StringTemplate. We then render the resulting XSL:FO to PDF using XF Rendering Server 2005, which is a little more affordable at $995.

I think it works pretty well. Creating the XSL:FO templates can be a bit tedious, but a companion product called XF Designer is available along with XF Rendering Server 2005.


by yusuf,   December 7, 2005 2:57 AM  

Take a look at http://www.digitaljunkies.ca/dompdf/ it's free but less flexible

  • happy holidays *

by Dominick,   January 25, 2007 7:35 PM  

Actually, there is another solution, which is not that bad: http://www.wikipublisher.org/wiki/

The problem with html to pdf is not necessarily the actual conversion, but the layout of the pdf. For example, reading a pdf document formatted in landscape with multi-column view is not reader-friendly for the web. Or for example, producing a bibliography, or an index that is dynamic. The author of wikipublisher is on the right track.


by Alex,   April 30, 2009 5:20 AM  

quite good solution, not free also.


by Alex,   April 30, 2009 5:21 AM  

http://www.alt-soft.com/products_Word2PDF.aspx quite good solution, not free also.



Add Comment