Skip to content

PDF Spec Annex I

Marc Jones edited this page Dec 30, 2025 · 1 revision

Annex I: PDF Versions and Compatibility

Part of: PDF-Spec-Annexes

Navigation: PDF-Spec-Annex-H | PDF-Spec-Index | PDF-Spec-Annex-J


Annex I

(normative)

PDF Versions and Compatibility

(Some errors should nevertheless be always reported, including file I/O errors, out-of-memory errors, and notifications that a command has failed.) Processing should continue if possible.

If a conforming reader opens a PDF file that has a minor version number newer than the version that it supports, it should notify the user that the document may contain information the conforming reader does not understand. If the conforming reader encounters an error, it should notify the user that the PDF file's version is newer than expected, an error has occurred, and no further errors will be reported.

Whether and how the version of a PDF file should change when the document is modified and saved depends on several factors. If the PDF file has a newer version than the conforming product supports, the conforming product should not alter the version-that is, a PDF file's version should never be changed to an older version. If the PDF file has an older version than the conforming product supports, the conforming product may update the PDF file's version to match the conforming product's version. If a user modifies a document by inserting the contents of another PDF file into it, the saved document's version should be the most recent of the conforming product's version, the original PDF file's version, and the inserted PDF file's version.

I.3 Feature Compatibility

When a new version of PDF is defined, many features are introduced simply by adding new entries to existing dictionaries. Earlier versions of conforming readers do not notice the existence of such entries and behave as if they were not there. Such new features are therefore both forward- and backward-compatible. Likewise, adding entries not described in the PDF specification to dictionary objects does not affect the conforming reader's behaviour. See Annex E for information on how to choose key names that are compatible with future versions of PDF. See 7.12.2, 'Developer Extensions Dictionary' for a discussion of how to designate the use of public extensions in PDF file.

In some cases, a new feature is impossible to ignore, because doing so would preclude some vital operation such as viewing or printing a page. For instance, if a page's content stream is encoded with some new type of filter, there is no way for an earlier version of conforming reader to view or print the page, even though the content stream (if decoded) would be perfectly understood by the reader. There is little choice but to give an error in cases like these. Such new features are forward-compatible but not backward-compatible.

In a few cases, new features are defined in a way that earlier versions of conforming readers will ignore, but the output will be degraded in some way without any error indication. If a PDF file undergoes editing by an earlier version of a conforming product that does not understand some of the features that the file uses, the occurrences of those features may or may not survive.

J.1 General

The Rename flag is used to specify whether fields imported from the template shall be renamed in the event of name conflicts with existing fields;

J.2 Implementation Example

If the Rename flag in the FDF template dictionary is true , fields with such conflicting names shall be renamed to guarantee their uniqueness. If Rename is false , the fields shall not be renamed; this results in multiple fields with the same name in the target document. Each time the FDF file provides attributes for a given field name, all fields with that name shall be updated.

This can be implemented by a conforming product renaming fields by prepending a page number, a template name, and an ordinal number to the field name. The ordinal number corresponds to the order in which the template is applied to a page, with 0 being the first template specified for the page.

EXAMPLE If the first template used on the fifth page has the name Template and has the Rename flag set to true , fields defined in that template are renamed by prepending the character string P5 . Template_0 . to their field names.


Navigation: PDF-Spec-Annex-H | PDF-Spec-Index | PDF-Spec-Annex-J

Clone this wiki locally