protected internal PdfCatalog(PdfDictionary pdfObject) : base(pdfObject) { if (pdfObject == null) { throw new PdfException(PdfException.DocumentHasNoPdfCatalogObject); } EnsureObjectIsAddedToDocument(pdfObject); GetPdfObject().Put(PdfName.Type, PdfName.Catalog); SetForbidRelease(); pageTree = new PdfPagesTree(this); }
protected internal PdfCatalog(PdfDictionary pdfObject) : base(pdfObject) { //This HashMap contents all pages of the document and outlines associated to them //This flag determines if Outline tree of the document has been built via calling getOutlines method. If this flag is false all outline operations will be ignored if (pdfObject == null) { throw new PdfException(PdfException.DocumentHasNoPdfCatalogObject); } EnsureObjectIsAddedToDocument(pdfObject); GetPdfObject().Put(PdfName.Type, PdfName.Catalog); SetForbidRelease(); pageTree = new PdfPagesTree(this); }
internal virtual int VerifyIntegrity(PdfPagesTree pagesTree) { IList <PdfPages> parents = pagesTree.GetParents(); int from = 0; for (int i = 0; i < parents.Count; i++) { if (parents[i].GetFrom() != from) { return(i); } from = parents[i].GetFrom() + parents[i].GetCount(); } return(-1); }