SetXMPProperty

文件屬性

描述

使用此函式庫內建支援結構定義的 XMP 引擎 (PDFlibXMP) 設定標準命名空間內的單一 XMP 屬性,而不需要呼叫者手寫 RDF XML;它會載入現有的 XMP 封包,修改正確 rdf:Description 區塊中具名的屬性,然後寫回

命名空間為以下之一:dc (Dublin Core: title, creator, description, subject, format)、xmp (XMP Basic: CreatorTool, CreateDate, ModifyDate)、pdf (Adobe PDF: Keywords, Producer)、pdfaid (PDF/A ID: part, conformance)、pdfuaid (PDF/UA ID: part)、xmpMM (XMP Media Management: InstanceID)

原生 macOS ARM64 支援以 Delphi 與 FPC 執行這項作業,包括命名空間感知的取代,以及保留不相關的中繼資料

語法

Delphi

Function TPDFlib.SetXMPProperty(Const Namespace, Key, Value: WideString): Integer;

參數

Namespace'dc', 'xmp', 'pdf', 'pdfaid', 'pdfuaid', 'xmpMM' 之一
Key該命名空間內的屬性名稱(例如 'title'、'CreatorTool'、'Keywords')
Value新屬性值

傳回值

0未知的命名空間、空鍵,或未載入任何文件
1屬性已設定且 XMP 封包已寫回