pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Schröder <mar...@oneiros.de>
Subject Re: How to retain existing Acrobat/PDF version using Splitter class
Date Tue, 17 Mar 2015 15:23:52 GMT
2015-03-17 14:26 GMT+01:00 Morales-Martin, Kristina <kmorales-martin@cas.org>:
> In our use of the org.apache.pdfbox.util.Splitter class to split a PDF document according
to top level bookmarks,
> we have observed that the newly created documents do not retain the existing Acrobat/PDF
version of the original document.
> (Splitter#createNewDocument()).
>
> Can experienced users/developers direct us to samples or other resources that show how
this can be achieved?

Hello Kristina,
can you try the attached patch to org.apache.pdfbox.multipdf.Splitter?
It should copy the PDF version of the source to the newly created documents.

Note that PDFBox always sets the version in the header to 1.4 and this
only updates the /Version entry in the Document Catalog. This should
be enough (at least it works with Adobe Reader).

Best
   Martin

Mime
View raw message