AddRoleMapNS

标记 PDF、PDF 兼容性

描述

添加 /RoleMapNS 条目,将自定义结构类型映射到目标类型和可选目标命名空间

语法

Delphi

Function TPDFlib.AddRoleMapNS(SourceNamespaceID: Integer; Const CustomType, TargetType: WideString; TargetNamespaceID: Integer): Integer;

DLL

Function DLAddRoleMapNS(InstanceID, SourceNamespaceID: Integer; CustomType, TargetType: PWideChar; TargetNamespaceID: Integer): Integer; Stdcall;

ActiveX

Function PDFlib::AddRoleMapNS(SourceNamespaceID As Long, CustomType As String, TargetType As String, TargetNamespaceID As Long) As Long

参数

SourceNamespaceID由 AddStructureNamespace 为拥有自定义类型的命名空间返回的标识符
CustomType要映射的自定义结构类型名称
TargetType目标结构类型名称
TargetNamespaceID目标命名空间标识符,或用 0 映射到默认标准命名空间

返回值

0命名空间标识符或类型名称无效
1映射已存储

备注

非零目标命名空间写入 PDF 2.0 数组形式 [/TargetType namespace-ref];零目标命名空间写入名称形式

另请参阅

AddRoleMap, AddStructureNamespace, GetStructTreeItemText