You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by honyk <j....@email.cz> on 2013/04/11 21:48:00 UTC

[OT] Multi-page support in PDFTranscoder

Dear All,

in my app I generate multipage PDFs from SVG sources. Currently I use Fop's
PDF Transcoder and all individual PDF pages (byte streams) merge together
using PDFBox.

I am considering extending the org.apache.fop.svg.PDFTranscoder class to
enable passing document array into the transcode method and to avoid another
dependency or, better, inefficiency.

protected void transcode(Document[] documents, String uri, TranscoderOutput
output) {
  // my code
}

But analyzing the code I am not sure if something like this is even
possible. E.g. this line is completely unclear to me (there is no transcode
method in the AbstractFOPTranscoder):

super.transcode(document, uri, output);

To be honest, I don't understand well how the final PDF file is generated
from input SVG nor the way how to intervene into this process and insert a
page break followed by another page.

Can be transcoder modified this way or it would be too complicated?

Thanks for any hints,

Jan