What's the best approach for producing a high-quality PDF from XML?
I'm looking at creating a high quality PDF from an XML source, as the output of an online photobook creation tool. There are literally hundreds of options for accomplishing this task from manual creation of the PDF (iT开发者_如何学Cext, PdfSharp etc) to PrinceXML to xsl-fo tools. Here's some of the features I would like to support:
Mandatory Support
- Full Bleed PDFs
- Multi-Format Page Composition
- Support for dust jackets, spine printing, full wrap graphics + text
- Non-standard Page Dimensions
- Overlapping Graphical Elements
- Custom Fonts
- Cross Fold Layout Support – Double Page Spread
- 300-600dpi Image Support
- True WYSIWYG / reliable, predictable output (i.e. pixel perfect conversion from source material to PDF)
- Margin Control
- Colour Profile Embedding
- Unicode support
- Absolutely Positioned layout Elements
Optional Support
- Relative Layout Elements
- Images (CMYK, RGB)
- Fonts over HTTP
- Hyphenation Support
- Crop Marks Support
- Footnotes
- Spot Colour Fills
- Tabular Data Support
- Typesetting Support (Leading, Kerning, etc)
If anyone knows of the best way to accomplish this, I'd be very grateful. Also, if anyone knows what other online photobook companies (such as Blurb or Shutterfly) use to convert an online book to a print-ready PDF I'd be very interested to know.
You should look into PrinceXML (which name you list in your question, but don't tell us what you didn't like about it), which a few days ago I've mentioned here -- even with screenshots showing the results. Other samples of prince output is also around to look at.
However, what you mean with "true WYSIWYG" remains pretty obscure to me.
Because you'll have to show me an XML renderer first... one that would display me your XML on screen just like you expect your PDF pages to look like.
Update: Here is a set of examples for a PDF files created by PrinceXML. You can download 14 of them with this command on Linux or Mac OS X:
for i in 9-02 9-01 8-12 8-11 8-10 8-09 8-08 8-07 8-06 8-05 8-04 8-03 8-02 8-01; do
wget \
-r \
-t 3 \
-l 1 \
-c \
-O AdvancedAquarist-200${i}.pdf \
http://www.advancedaquarist.com/pdf/AdvancedAquarist-200${i}.pdf/at_download/file
done
On Windows:
for %i in (9-02 9-01 8-12 8-11 8-10 8-09 8-08 8-07 8-06 8-05 8-04 8-03 8-02 8-01) do ^
wget.exe ^
-r ^
-t 3 ^
-l 1 ^
-c ^
-O AdvancedAquarist-200%i.pdf ^
http://www.advancedaquarist.com/pdf/AdvancedAquarist-200%i.pdf/at_download/file
IMHO, these are pretty complex layouts being produced here.
Note, that the older issues of this magazine, up to May 2008, were created with iText 1.4.6 (according to their metadata).
The newer issues, from June 2008, were mostly done with PrinceXML 6.0 (which is a release from 4 years ago...).
Nevertheless, both applications produced a very similar layout...
You need to translate the XML into HTML/XHTML, style it as you want, and in a suitable browser, go to File>Print and, with the right drivers set up, you can print to PDF.
Expecting a magic direct conversion is a big ask :-)
精彩评论