/// <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> /// 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()); }