/// <summary>A namespace this element belongs to (see ISO 32000-2 14.7.4, "Namespaces").</summary> /// <remarks> /// A namespace this element belongs to (see ISO 32000-2 14.7.4, "Namespaces"). /// <p>This value has meaning only for the PDF documents of version <b>2.0 and higher</b>.</p> /// </remarks> /// <param name="namespace"> /// a /// <see cref="PdfNamespace"/> /// this element belongs to, or null if element is desired to be considered /// in the default standard structure namespace. /// </param> public virtual void SetNamespace(PdfNamespace @namespace) { VersionConforming.ValidatePdfVersionForDictEntry(GetDocument(), PdfVersion.PDF_2_0, PdfName.NS, PdfName.StructElem ); if (@namespace != null) { Put(PdfName.NS, @namespace.GetPdfObject()); } else { GetPdfObject().Remove(PdfName.NS); SetModified(); } }
/// <summary> /// Checks if the given namespace is identified as the one that is common within broad ranges of documents types /// and doesn't require a role mapping for it's roles. /// </summary> /// <param name="namespace">a namespace to be checked, whether it defines a namespace of the known domain specific language. /// </param> /// <returns> /// true, if the given /// <see cref="PdfNamespace"/> /// belongs to the domain-specific namespace, false otherwise. /// </returns> public static bool IsKnownDomainSpecificNamespace(PdfNamespace @namespace) { return(MATH_ML.Equals(@namespace.GetNamespaceName())); }
/// <summary> /// Adds a /// <see cref="PdfNamespace"/> /// to the list of the namespaces used within the document. /// <p>This value has meaning only for the PDF documents of version <b>2.0 and higher</b>.</p> /// </summary> /// <param name="namespace"> /// a /// <see cref="PdfNamespace"/> /// to be added. /// </param> public virtual void AddNamespace(PdfNamespace @namespace) { GetNamespacesObject().Add(@namespace.GetPdfObject()); SetModified(); }
public PdfStructureAttributes(PdfNamespace @namespace) : base(new PdfDictionary()) { GetPdfObject().Put(PdfName.O, PdfName.NSO); GetPdfObject().Put(PdfName.NS, @namespace.GetPdfObject()); }