Class PdfNamespace
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
stringa 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
PdfDictionarya 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
PdfStringa 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
stringa string identifying structure element type in this namespace.
defaultNsRole
stringa 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
stringa string identifying structure element type in this namespace.
targetNsRole
stringa string identifying a structure element type in the target namespace.
targetNs
PdfNamespacea PdfNamespace identifying the target namespace.
Returns
- PdfNamespace
this PdfNamespace instance.
GetNamespaceName()
Gets the string defining the namespace name.
public virtual string GetNamespaceName()
Returns
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
SetNamespaceName(string)
Sets the string defining the namespace name.
public virtual PdfNamespace SetNamespaceName(string namespaceName)
Parameters
namespaceName
stringa 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
PdfStringa 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
PdfDictionarya 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
PdfFileSpeca PdfFileSpec identifying the schema file.
Returns
- PdfNamespace
this PdfNamespace instance.