Table of Contents

Class PdfNamespace

Namespace
iText.Kernel.Pdf.Tagging
Assembly
itext.kernel.dll

A wrapper for namespace dictionaries (ISO 32000-2 section 14.7.4).

public class PdfNamespace : PdfObjectWrapper<PdfDictionary>
Inheritance
PdfNamespace
Inherited Members

Remarks

A wrapper for namespace dictionaries (ISO 32000-2 section 14.7.4). A namespace dictionary defines a namespace within the structure tree.

This pdf entity is meaningful only for the PDF documents of version 2.0 and higher.

Constructors

PdfNamespace(string)

Constructs a namespace defined by the given namespace name.

public PdfNamespace(string namespaceName)

Parameters

namespaceName string

a string defining the namespace name (conventionally a uniform resource identifier, or URI).

PdfNamespace(PdfDictionary)

Constructs namespace from the given PdfDictionary that represents namespace dictionary.

public PdfNamespace(PdfDictionary dictionary)

Parameters

dictionary PdfDictionary

a PdfDictionary that represents namespace in the document.

Remarks

Constructs namespace from the given PdfDictionary that represents namespace dictionary. This method is useful for property reading in reading mode or modifying in stamping mode.

PdfNamespace(PdfString)

Constructs a namespace defined by the given namespace name.

public PdfNamespace(PdfString namespaceName)

Parameters

namespaceName PdfString

a PdfString defining the namespace name (conventionally a uniform resource identifier, or URI).

Methods

AddNamespaceRoleMapping(string, string)

Adds to the namespace role map (see SetNamespaceRoleMap(PdfDictionary) ) a single role mapping to the default standard structure namespace.

public virtual PdfNamespace AddNamespaceRoleMapping(string thisNsRole, string defaultNsRole)

Parameters

thisNsRole string

a string identifying structure element type in this namespace.

defaultNsRole string

a string identifying a structure element type in the default standard structure namespace.

Returns

PdfNamespace

this PdfNamespace instance.

AddNamespaceRoleMapping(string, string, PdfNamespace)

Adds to the namespace role map (see SetNamespaceRoleMap(PdfDictionary) ) a single role mapping to the target namespace.

public virtual PdfNamespace AddNamespaceRoleMapping(string thisNsRole, string targetNsRole, PdfNamespace targetNs)

Parameters

thisNsRole string

a string identifying structure element type in this namespace.

targetNsRole string

a string identifying a structure element type in the target namespace.

targetNs PdfNamespace

a PdfNamespace identifying the target namespace.

Returns

PdfNamespace

this PdfNamespace instance.

GetNamespaceName()

Gets the string defining the namespace name.

public virtual string GetNamespaceName()

Returns

string

a string defining the namespace name (conventionally a uniform resource identifier, or URI).

GetNamespaceRoleMap()

A dictionary that maps the names of structure types used in the namespace to their approximate equivalents in another namespace.

public virtual PdfDictionary GetNamespaceRoleMap()

Returns

PdfDictionary

a PdfDictionary which is comprised of a set of keys representing structure element types in the namespace defined within this namespace dictionary. The corresponding value for each of these keys shall either be a single PdfName identifying a structure element type in the default namespace or an PdfArray where the first value shall be a structure element type name in a target namespace with the second value being an indirect reference to the target namespace dictionary.

GetSchema()

Gets file specification identifying the schema file, which defines this namespace.

public virtual PdfFileSpec GetSchema()

Returns

PdfFileSpec

a PdfFileSpec identifying the schema file.

IsWrappedObjectMustBeIndirect()

protected override bool IsWrappedObjectMustBeIndirect()

Returns

bool

SetNamespaceName(string)

Sets the string defining the namespace name.

public virtual PdfNamespace SetNamespaceName(string namespaceName)

Parameters

namespaceName string

a string defining the namespace name (conventionally a uniform resource identifier, or URI).

Returns

PdfNamespace

this PdfNamespace instance.

SetNamespaceName(PdfString)

Sets the string defining the namespace name.

public virtual PdfNamespace SetNamespaceName(PdfString namespaceName)

Parameters

namespaceName PdfString

a PdfString defining the namespace name (conventionally a uniform resource identifier, or URI).

Returns

PdfNamespace

this PdfNamespace instance.

SetNamespaceRoleMap(PdfDictionary)

A dictionary that maps the names of structure types used in the namespace to their approximate equivalents in another namespace.

public virtual PdfNamespace SetNamespaceRoleMap(PdfDictionary roleMapNs)

Parameters

roleMapNs PdfDictionary

a PdfDictionary which is comprised of a set of keys representing structure element types in the namespace defined within this namespace dictionary. The corresponding value for each of these keys shall either be a single PdfName identifying a structure element type in the default namespace or an PdfArray where the first value shall be a structure element type name in a target namespace with the second value being an indirect reference to the target namespace dictionary.

Returns

PdfNamespace

this PdfNamespace instance.

SetSchema(PdfFileSpec)

Sets file specification identifying the schema file, which defines this namespace.

public virtual PdfNamespace SetSchema(PdfFileSpec fileSpec)

Parameters

fileSpec PdfFileSpec

a PdfFileSpec identifying the schema file.

Returns

PdfNamespace

this PdfNamespace instance.