#25 Access to stream arrays


In Apache FOP I recently developed experimental support for embedding existing PDFs in XSL-FO documents destined for PDF output as normal fo:external-graphic elements. I used PDFBox to parse the PDFs since FOP's PDF library doesn't support parsing. I wrote some adapter code that translates PDFBox's object model into FOP's.

While doing that I stumbled over the problem that I couldn't access the individual streams in a stream array. Therefore I added accessors for that. Please find these in the patch file. I'd be grateful if they could be added to PDFBox.

During my work I changed from the scratch file to a RandomAccessBuffer in PDStream's constructor. Since it was before my holidays I don't remember exactly why I did that. I think I had a case where more than one scratch file was needed. But I can't reproduce it anymore. That may just be something to think about. I'll re-raise this if I can reproduce the problem.

Jeremias Maerki


  • Ben Litchfield

    Ben Litchfield - 2007-10-16
    • status: open --> closed-fixed
  • Ben Litchfield

    Ben Litchfield - 2007-10-16

    Logged In: YES
    Originator: NO

    Patch is applied. Currently there is a limitation where you can one be writing to one stream per scratch file at a time. So right now you can't

    1)Start a content stream
    2)Add a image/font/... stream
    3)End the content stream

    Maybe that is what you were running into.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks