public PdfStructElem(PdfDocument document, PdfName role, PdfAnnotation annot) : this(document, role) { if (annot.GetPage() == null) { throw new PdfException(PdfException.AnnotationShallHaveReferenceToPage); } GetPdfObject().Put(PdfName.Pg, annot.GetPage().GetPdfObject()); }
public PdfStructElem(PdfDocument document, PdfName role, PdfAnnotation annot) : this(document, role) { if (annot.GetPage() == null) { throw new PdfException(PdfException.AnnotationShallHaveReferenceToPage); } // Explicitly using object indirect reference here in order to correctly process released objects. GetPdfObject().Put(PdfName.Pg, annot.GetPage().GetPdfObject().GetIndirectReference()); }