SetPDFUAModeA

Document properties, Accessibility

Popis

Koncové A označuje vstupní bod DLL pro ANSI (char); povrch ActiveX/COM vystavuje jen Unicode formu. Chování je shodné s SetPDFUAMode a řetězcové argumenty se interpretují podle aktuální kódové stránky SetAnsiMode

Activates PDF/UA-1 (ISO 14289-1:2014) conformance mode for the selected document. This single call performs all document-level setup required by the standard: the document version is bumped to at least PDF 1.7, MarkInfo.Marked and MarkInfo.Suspects are written, DisplayDocTitle is enabled in ViewerPreferences, Catalog/Lang is set when a language is supplied, and the pdfuaid:part=1 XMP namespace entry is written. When the document is encrypted after SetPDFUAMode is active, CanCopyAccess (bit 10 of the encryption /P key) is automatically forced on regardless of the caller-supplied TPDFExtraPermissions mask, satisfying ISO 14289-1 §7.16. If the document was already encrypted before SetPDFUAMode was called, the existing encrypt dictionary is left unchanged — call Encrypt again after SetPDFUAMode to refresh the /P value. GetPDFUADiagnostics reports this situation as ENCRYPT-NO-ACCESS.

Zavolejte před přidáním jakéhokoli obsahu. Obsah dokumentu otagujte pomocí BeginTag/EndTag a BeginArtifact/EndArtifact

Syntaxe

Delphi

Function DLSetPDFUAModeA(InstanceID: Integer; Language: PAnsiChar): Integer;

DLL

int DLSetPDFUAModeA(int InstanceID, const char * Language);

Parametry

LanguageJazykový tag BCP 47 pro výchozí jazyk dokumentu, například "en-US", "de". Prázdný řetězec vynechá položku /Lang v katalogu

Return values

0Failed (no document is open)
1PDF/UA mode activated successfully

Poznámky

At save time, all open pages automatically receive a /Tabs /S entry (structure-based tab order) when PDF/UA mode is active, satisfying ISO 14289-1 §7.18.3. Save-time fix-ups also auto-fill missing widget tooltips (/TU) and annotation /Contents entries, attach /AFRelationship to embedded files, strip any TrapNet annotations (forbidden by ISO 14289-1 §7.18.2), and attach /O = List /ListNumbering = None to any L structure element that lacks an explicit ListNumbering attribute (ISO 14289-1 §7.6).

See also: SetDocumentLanguage, SetMarkInfo, SetPDFAMode.