Package com.lowagie.text.pdf
Class PdfReader.PageRefs
java.lang.Object
com.lowagie.text.pdf.PdfReader.PageRefs
- Enclosing class:
PdfReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private int
Page number of the last page that was read (partial reading only)private List
<PdfDictionary> stack to which pages dictionaries are pushed to keep track of the current page attributesprivate final PdfReader
ArrayList with the indirect references to every page.private IntHashtable
intHashtable that does the same thing as refsn in case of partial reading: major difference: not all the pages are read.private int
The 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 page dictionary of the specified pagegetPageNRelease
(int pageNum) Gets the page reference to this page.getPageOrigRef
(int pageNum) Gets the page reference to this page.getPageOrigRefRelease
(int pageNum) Releases the page reference to this page.protected PRIndirectReference
getSinglePage
(int n) (package private) void
insertPage
(int pageNum, PRIndirectReference ref) private void
iteratePages
(PdfDictionary page) private void
iteratePages
(PRIndirectReference rpage) (package private) void
private void
Removes the last PdfDictionary that was pushed to the pageInh stack.private void
pushPageAttributes
(PdfDictionary nodePages) Adds a PdfDictionary to the pageInh stack to keep track of the page attributes.(package private) void
void
releasePage
(int pageNum) (package private) void
void
private void
selectPages
(List<Integer> pagesToKeep) (package private) int
size()
-
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
-
-
Constructor Details
-
PageRefs
-
PageRefs
PageRefs(PdfReader.PageRefs other, PdfReader reader)
-
-
Method Details
-
size
int size() -
readPages
void readPages() -
reReadPages
void reReadPages() -
getPageN
Gets the page dictionary of the specified page- Parameters:
pageNum
- the page number. 1 is the first- Returns:
- the page dictionary
-
getPageNRelease
Gets the page reference to this page.- Parameters:
pageNum
- the page number.- Returns:
- a dictionary object or null when the page does not exist
-
getPageOrigRefRelease
Releases the page reference to this page.- Parameters:
pageNum
- the page number.- 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 or null if the page does not exist
-
keepPages
void keepPages() -
releasePage
public void releasePage(int 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
-
iteratePages
-
getSinglePage
-
selectPages
-