PDFium Delphi Component 文件

Creator 属性

组件: TPdf  ·  单元: PDFium
存储在 Info 字典中的原始创作应用程序名称。

Syntax

property Creator: WString; // read only

Description

Creator 返回文档信息 字典(PDF 1.7 规范第 14.3.3 节)中的 /Creator 条目。按惯例,此字段标识 生成原始文档的应用程序 — 例如 Microsoft Word、 LibreOffice Writer、Adobe InDesign — 而 Producer 标识 将该源转换为最终 PDF 的软件(通常是 PDF 库, 如 Adobe PDF Library、GPL Ghostscript、PDFium 等)

返回值是解码后的 UTF-16(WString),因此非 ASCII 名称(如 “Microsoft® Word for Microsoft 365”或完整 CJK 产品名)会被 原样保留。当 Active 为 False、 Info 字典缺失,或 PDF 生成时没有 /Creator 条目(完全合法:该字段是可选的)时,字符串为空

较新的 PDF 也可能在 XMP 元数据 (xmp:CreatorTool)中携带相同信息;当两者都存在时它们应一致,但历史上 在多次编辑/保存循环后会漂移。PDFium Delphi Component 仅通过此属性呈现 Info 字典的 副本 — 如果你明确需要 XMP 版本,请访问 MetaText['CreatorTool']

Remarks

Example

Pdf1.LoadFromFile(OpenDialog1.FileName);
Memo1.Lines.Add('Authored with: ' + Pdf1.Creator);
Memo1.Lines.Add('PDF engine: ' + Pdf1.Producer);

See Also

Producer, Author, Title, MetaText