Q: I have the trial version of PDFnet toolkit, and I'd like to know if
there's a way to change the PDF version of an existing PDF document.
For example, open a PDF document that was created with PDF version of
1.3 (Acrobat 5.x) and save it as PDF version 1.4 (Acrobat 6.x). Could
you tell how to do that?
A: Using PDFNet you can modify PDF header and versioning information.
For example, to save a document using a different header string using
pdfdoc.GetSDFDoc().Save(...) instead of pdfdoc.Save(...). For example,
to save the file with 'PDF 1.6' in the header use the following code:
// pdfdoc.GetRoot().PutName("Version", "1.6"); // Optional
pdfdoc.GetSDFDoc().Save("my.pdf", 0, "%PDF-1.6");
Please keep in mind that, the main difference is that the saved
document will have a different header and versioning information.
PDFNet will make sure that the Cos (i.e. low-level) representation is
fully compatible with the specified version of the target PDF
document. However if the document contains high-level features that
are not available in the target version, the features will not be
discarded. In most cases Acrobat Reader ignores or gracefully handles
features that are not recognized. Since you want to upgrade your files
(e.g. save PDF 1.3 as PDF 1.4 or higher) you should not run into any
You could also use PDFNet to process and edit PDF documents to make
sure that saved document fully conforms to the given PDF revision
(e.g. by recompressing JBIG2 and JPEG2000 streams or flattening
transparency etc.), however this should be done as a pre-processing
step before pdfdoc.Save().