SetPDFXMode

Compliance

Description

Selects the PDF/X conformance mode the writer enforces while a document is authored (ISO 15930)

Syntax

Delphi

Function SetPDFXMode(NewMode: Integer): Integer;

Parameters

NewMode1 selects PDF/X-1a:2003, 2 selects PDF/X-3:2003, 3 selects PDF/X-4, 4 selects PDF/X-6 complete exchange, 5 selects PDF/X-6p process-colour partial exchange, 6 selects PDF/X-6n n-colourant partial exchange, 7 selects PDF/X-4p external-profile partial exchange, 8 selects PDF/X-5g OPI partial exchange and 9 selects PDF/X-5pg external-profile process-colour partial exchange; modes 7 to 9 keep the PDF 1.6 syntax base

Return values

1 when the mode was selected, 0 for an invalid mode, a loaded document (the mode applies to newly created documents only) or a save version explicitly locked above the part base

Remarks

The mode writes the pdfxid XMP edition identification, configures the relevant output-intent workflow, declares /Trapped and bases the save version on the part: PDF 1.4 for X-1a and X-3, PDF 1.6 for X-4 and PDF 2.0 for the PDF/X-6 family

PDF/X-1a, PDF/X-3 and PDF/X-4 declare a CMYK print condition, and the library ships no CMYK profile: call LoadOutputIntentProfile with the CMYK ICC profile of the intended print condition before saving. Until then the output intent carries no DestOutputProfile and preflight reports it, instead of the earlier sRGB profile labelled as four-component

PDF/X-6 complete exchange uses the bundled sRGB profile by default so the embedded ICC payload and its three-component declaration agree; use LoadOutputIntentProfile to supply another Gray, RGB or CMYK print profile

PDF/X-6p and PDF/X-6n do not create an embedded profile; call SetOutputIntentProfileReference with a process-colour or n-colourant ICC file and one or more retrievable URIs before saving

The PDF/X-6 family may also use page-level output intents created with SetPageOutputIntent; an explicit page intent takes precedence over the document intent, and preflight requires every page to resolve to one of them

Authoring-time gates reject DeviceRGB and ICCBased colour spaces under X-1a (for colours and for images placed with DrawImage or DrawImageMatrix, which then return 0 with LastErrorCode 601), transparency and optional content outside X-4, document-level JavaScript, file attachments, encryption, LZWDecode images and non-embedded fonts in every mode

PDF/X-6 permits JavaScript only when a user directly activates a Link annotation, limits named actions to page navigation, and rejects unsafe actions such as Launch, ResetForm, ImportData, Hide and SetOCGState

At save time every page receives a TrimBox (defaulting to its MediaBox), annotation Print, Hidden, Invisible, NoView and ToggleNoView flags are normalised, the AcroForm NeedAppearances flag is set to false and the trapping state is declared

PDF/X-6 preflight also validates fixed annotation appearances, button appearance states, AcroForm and signature widgets, XFA and NeedsRendering exclusions, action chains and catalog, page, screen, widget and field action restrictions

GetInformation(203) reports the active mode

See also

SetPDFAMode, LoadOutputIntentProfile, SetOutputIntentSubtype, SetPageOutputIntent, SetOutputIntentProfileReference, AddOutputIntentProfileReferenceURL, GetEffectivePageOutputIntentJSON