PDF Version-Specific Save Compatibility
Version 3.23.0 treats the selected PDF save version as a strict full-save output contract. When an application calls SetInformation(0, "1.2"), "1.3", "1.4", "1.5", "1.6", or "1.7", SaveToFile, SaveToString, and SaveToStream write output that matches the selected target or fail before writing output.
Full saves remove Catalog /Version overrides so a loaded document cannot silently raise the effective version above the selected header. Lower-version targets also remove unsupported Catalog /Extensions entries, and PDF 1.3 targets omit Catalog /Metadata and XMP Metadata streams while preserving the document information dictionary.
The save preflight rejects known later-version features instead of producing a mixed-version file. The checked boundaries include PDF 1.3 page boxes, embedded file streams, JavaScript actions, ICCBased and DeviceN color spaces, and ToUnicode CMaps; PDF 1.4 transparency, annotation /CA opacity, JBIG2Decode, Metadata streams, and the document-level EmbeddedFiles name tree; PDF 1.5 optional content, JPXDecode, object streams, xref streams, and Crypt filters; PDF 1.6 UserUnit, 3D annotation structures, and AESV2 crypt filters; and PDF 1.7 Requirements and extension-level features.
PDF 1.7 Adobe extension-level requirements are checked separately from the PDF 1.7 header. AESV3, AES-256, RichMedia, Projection, geospatial dictionaries, and ETSI signature subfilters must have a sufficient Catalog /Extensions /ADBE /ExtensionLevel declaration, and PDFlib writer entry points that emit those features add the matching extension declaration automatically when the selected save target can be raised to PDF 1.7.
TPDFlib callers receive LastErrorCode 602 when the selected target version is lower than a feature still present in the document. Choose a newer target version or remove the incompatible feature before saving.