Forum How do I...?

Inclusion of PDF contents

yet
The basic question is: how to include PDF content into the processing of a PrinceXML source document.

The overall usecase: PrinceXML content should contain some adds (e.g. half-page long ads) that are delivered as PDF - they should be placed within the Prince generated content.

Option a) Leaving a place-holder within the Prince-generated PDF documented and using some external tool for stamping the PDF ads into the Prince-PDF file

Option b) converting the PDF file to SVG and inclusion the SVG from within the Prince source content file.

I did a quick evaluation of some PDF to SVG converters but the results so far are far away from appearing promising.

Anyone resolved this issue?
mikeday
The first option sounds the most reliable, I would expect.
RBK
yet wrote:
I did a quick evaluation of some PDF to SVG converters but the results so far are far away from appearing promising.

For some simple cases, inkscape did the job for me.
twantzen
@mike Since up to now PrinceXML (sadly!) doesn't support PDFs as <img> (or <object>) content: Do you have an example, which tool can be used to place a PDF to a specific page and specific coordinates inside a PrinceXML generated PDF, which can be driven with JAVA?

Or are you nearly finished with implementing PDF asset support in PrinceXML right now? (Hope never dies!)

Thanks, Tobias
mikeday
Sorry we are focusing on CSS Grid support this year rather than PDF loading support, so much to do! :D

A quick search of possibly relevant tools suggest that most seem to insert entire pages from another PDF, which doesn't sound like what you need, although I assume Adobe must have something that can do this?
twantzen
Mike, thanks for your feedback. CSS Grid is valuable either – that's indisputable. But I'd love to see PDF integration as soon as possible ...

Thanks for your quick search – I thought you might have a tool at hand for the integration of adverts, but okay, I'll dig a bit deeper in the web.