How can I change the PDF version number in my output files?
Estimated Reading Time: 1 MinutesWith APDFL's C/C++ interface, a document can be saved with a different version number by specifying the major and minor parameters in the PDDocSaveParams struct passed in to the PDDocSaveWithParams() function. Alternately, one could call the PDDocSetMinorVersion() or PDDocSetAdobePDFVersion() functions.
With APDFL's .Net and .NetFramework interfaces, the Document class has MajorVersion and MinorVersion properties that can be set.
With APDFL's Java interface, the Document.setMajorVersion() and Document.setMinorVersion() methods can be used to set the PDF's version number.
Please note that changing a file's version to an earlier version will not necessarily modify the file's content to conform to the capabilities associated with that PDF version. Making a conforming PDF v1.4 document from a PDF that uses PDF v1.7 features can be a fairly involved process. Conversely , turning a PDF v1.3 into a PDF v2.0 document can be be done by just changing the version number, but should only be done for documents that do not use PDF v2.0 deprecated features.
Also, while a PDF version is stored in the PDF's file header (the first line of every PDF document is a file header with the characters “%PDF-“ followed by a version number, shown as “1.n,” where “n” would be a digit from 0 to 7. So the first line of a PDF document might look like this:
%PDF-1.7
Since PDF v1.4, this header version can be overriden by the Version entry in the root catalog, which allows a PDF processor to update the version using an incremental update.