SetCatalogInformation

文档属性

描述

此函数允许您在 PDF 文档中存储自定义信息。它与 SetCustomInformation 函数类似,但信息存储在文档目录中,而不是文档信息字典中。元数据应使用 SetCustomInformation 存储在文档信息字典中,私有内容或结构信息应使用此函数存储在文档目录中

键不能是由库或 PDF 规范管理的 Catalog 系统键。保留名称包括 Type、Version、Extensions、Pages、PageLabels、Names、Dests、ViewerPreferences、OpenAction、AA、AcroForm、Metadata、StructTreeRoot、MarkInfo、Lang、SpiderInfo、OutputIntents、PieceInfo、OCProperties、Perms、Legal、Requirements、Collection 和 NeedsRendering

语法

Delphi

Function TPDFlib.SetCatalogInformation(Const Key, NewValue: WideString): Integer;

ActiveX

Function PDFlib::SetCatalogInformation(Key As String, NewValue As String) As Long

DLL

int DLSetCatalogInformation(int InstanceID, const wchar_t * Key, const wchar_t * NewValue);

参数

Key要设置的键名。此键必须具有 Adobe 为你分配的特殊前缀,以避免与其他软件冲突
NewValue指定键的新值

返回值

0无法设置指定键,它可能是系统键
1已成功设置指定键的值