views:

203

answers:

6

Note: I realize this question has already been asked (with a ruby slant) here: http://stackoverflow.com/questions/786670/creating-on-demand-print-quality-pdfs-preferably-in-ruby-if-feasible. BUT there was no decent answer IMHO.

So as you may have guessed, I am looking to find the best approach to producing HIGH QUALITY, print ready PDF documents programatically. Our requirements need us to be able to have design documents that define place holders for dynamic content like images and text i.e. some kind of template mechanism.

The suggestion has been to use Adobe's InDesign server, but this seems like an expensive solution not to mention a little overkill for our need.

Are there any alternative, cheaper and more fitting solutions out there? The language of the solution doesn't really matter, just as long as it can be executes on a Windows box.

Cheers, Chris.

A: 

Java language and JasperReports

Boris Pavlović
Isn't JasperReports a BI tool?
Owen
I actually don't know if it's a BI tool. Maybe is, but who does give a dam. It fully covers needs described in the question
Boris Pavlović
I'm a bit confused how? I need to produce a high-res PDF that will be used to display product items in a catalogue type document. Even if JasperReports outputs PDFs wont it be things like charts etc?
Owen
Actually, you can do that. Charts and photos can be created in Java using standard or 3rd party libraries and exported to images. JasperReports then puts these images into predefined layouts created in the iReport design tool. Also, the design can be split to modules, i.e. subreports and made configurable. It's a powerful tool which enables work on a higher abstract level.
Boris Pavlović
A: 

Java: iText

C#: iTextSharp

Carles
Those are interesting - I stand by my answer to the specifici question but those are things I'm "filing away" for use in my personal toolbox!
Murph
+2  A: 

You can convert XML templates to PDFs with Prince.

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

Nick D
Would this product Print Quality PDFs?
Owen
it generates PDF files but I don't think it supports printing. One possible solution is to generate a postscript file and print that one. You can download it and check it out in a short amount of time.
Nick D
According to their docs: http://www.princexml.com/doc/7.0/pdf-output/ postscript output has been disabled.
Owen
+1  A: 

My suggestion would be to look at XSL-FO or thereabouts...

You create an XML doc that describes what you want and there are various libraries and toolkits (I've used XEP from RenderX) that will convert said XML into PDF.

In real terms what we did was take a large lump of data in XML format, use XSLT - templates in effect - to convert the data to formating objects which XEP renders up into something (a 500 page hotel directory with auto-generated TOC and Index) that has been consumed quite happily by at least three different commercial printers. We did some other smaller documents too from time to time.

Downside with this is that its not even remotely a WYSIWYG solution - you're effectively compiling "source code" to get PDF out the back. Upside is that the base technologies are reasonably generic even if the specific toolkits may be a bit less so.

Murph
+1 - XSL-FO is a good choice, not trivial to learn, and has a .NET version now.
James Black
Yes, not trivial... I think that if one is comfortable with XML and XSLT then its fairly straightforward (though still not trivial) - certainly we - I - did a lot by bascially hacking examples about and the return is that you have a huge amount of control.
Murph
XEP Server seems to be an expensive choice too, I am supprised there is nothing open source that will do this. Am I been a bit niaeve here?
Owen
Should pay attention when I comment (-: Apache have a project: http://xmlgraphics.apache.org/fop/ - however I picked XEP 7 years ago when there were specific issues (lost in the depths of time) with the apache project that a rewrite (which I assume they've now done) was to resolve.Kind of depends on your definition of expensive too - there's probably a chicken and egg problem here with cost constraining demand.
Murph
A: 

depends on what you want to publish, but take a look at Pentaho reporting http://reporting.pentaho.org/

Daniel
+1  A: 

I have and also know many people that have had much success with ReportLab an open source Python PDF library (http://www.reportlab.org/rl_toolkit.html).

Its extremely easy to use and very quick to get started. So worth trying out.

Orange Box