示例#1
0
 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());
 }
示例#2
0
 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());
 }