Class PdfReader.PageRefs
java.lang.Object
com.itextpdf.text.pdf.PdfReader.PageRefs
- Enclosing class:
PdfReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate intPage number of the last page that was read (partial reading only)private ArrayList<PdfDictionary> stack to which pages dictionaries are pushed to keep track of the current page attributesKeeps track of all pages nodes to avoid circular references.private final PdfReaderprivate ArrayList<PRIndirectReference> ArrayList with the indirect references to every page.private IntHashtableintHashtable that does the same thing as refsn in case of partial reading: major difference: not all the pages are read.private intThe number of pages, updated only in case of partial reading. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate(package private)PageRefs(PdfReader.PageRefs other, PdfReader reader) -
Method Summary
Modifier and TypeMethodDescriptiongetPageN(int pageNum) Gets the dictionary that represents a page.getPageNRelease(int pageNum) getPageOrigRef(int pageNum) Gets the page reference to this page.getPageOrigRefRelease(int pageNum) protected PRIndirectReferencegetSinglePage(int n) (package private) voidinsertPage(int pageNum, PRIndirectReference ref) private voiditeratePages(PRIndirectReference rpage) (package private) voidprivate voidRemoves the last PdfDictionary that was pushed to the pageInh stack.private voidpushPageAttributes(PdfDictionary nodePages) Adds a PdfDictionary to the pageInh stack to keep track of the page attributes.(package private) voidvoidreleasePage(int pageNum) (package private) voidvoidprivate voidselectPages(List<Integer> pagesToKeep) (package private) intsize()
-
Field Details
-
reader
-
refsn
ArrayList with the indirect references to every page. Element 0 = page 1; 1 = page 2;... Not used for partial reading. -
sizep
private int sizepThe number of pages, updated only in case of partial reading. -
refsp
intHashtable that does the same thing as refsn in case of partial reading: major difference: not all the pages are read. -
lastPageRead
private int lastPageReadPage number of the last page that was read (partial reading only) -
pageInh
stack to which pages dictionaries are pushed to keep track of the current page attributes -
keepPages
private boolean keepPages -
pagesNodes
-
-
Constructor Details
-
PageRefs
- Throws:
IOException
-
PageRefs
PageRefs(PdfReader.PageRefs other, PdfReader reader)
-
-
Method Details
-
size
int size() -
readPages
- Throws:
IOException
-
reReadPages
- Throws:
IOException
-
getPageN
Gets the dictionary that represents a page.- Parameters:
pageNum- the page number. 1 is the first- Returns:
- the page dictionary
-
getPageNRelease
- Parameters:
pageNum-- Returns:
- a dictionary object
-
getPageOrigRefRelease
- Parameters:
pageNum-- Returns:
- an indirect reference
-
getPageOrigRef
Gets the page reference to this page.- Parameters:
pageNum- the page number. 1 is the first- Returns:
- the page reference
-
keepPages
void keepPages() -
releasePage
public void releasePage(int pageNum) - Parameters:
pageNum-
-
resetReleasePage
public void resetReleasePage() -
insertPage
-
pushPageAttributes
Adds a PdfDictionary to the pageInh stack to keep track of the page attributes.- Parameters:
nodePages- a Pages dictionary
-
popPageAttributes
private void popPageAttributes()Removes the last PdfDictionary that was pushed to the pageInh stack. -
iteratePages
- Throws:
IOException
-
getSinglePage
-
selectPages
-