AddRoleMapNS

Tagged PDF, PDF compatibility

Description

Adds a /RoleMapNS entry that maps a custom structure type to a target type and optional target namespace

Syntax

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

Parameters

SourceNamespaceIDIdentifier returned by AddStructureNamespace for the namespace that owns the custom type
CustomTypeCustom structure type name to map
TargetTypeDestination structure type name
TargetNamespaceIDDestination namespace identifier, or 0 to map to the default standard namespace

Return values

0A namespace identifier or type name is invalid
1The mapping was stored

Remarks

A nonzero target namespace writes the PDF 2.0 array form [/TargetType namespace-ref]; a zero target namespace writes the name form

See also

AddRoleMap, AddStructureNamespace, GetStructTreeItemText