| Modifier and Type | Class and Description |
|---|---|
| private static class | PDPageLabels.
Generates the labels in a page range. |
| private static interface | PDPageLabels.
Internal interface for the control flow support. |
| Modifier and Type | Field and Description |
|---|---|
| private final PDDocument | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | PDPageLabels(PDDocument
The document the page label dictionary is created for. document)Creates an empty page label dictionary for the given document. |
| public | PDPageLabels(PDDocument
The document the page label dictionary is created for. document, COSDictionary an existing page label dictionary dict)Creates an page label dictionary for a document using the information in the given COS dictionary. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public COSBase | getCOSObject()
Implements org. Convert this standard java object to a COS object. |
| public String[] | Returns: an array mapping from 0-based page indices to labels.Returns a mapping with 0-based page indices as keys and corresponding page labels as values as an array. |
| public NavigableSet | Returns: set of page indices.Get an ordered set of page indices having a page label range. |
| public Map | Returns: a mapping from labels to 0-based page indices.Returns a mapping with computed page labels as keys and corresponding 0-based page indices as values. |
| public PDPageLabelRange | Returns: the page label range ornull if no label range is defined
for the given start page.the 0-based page index representing the start page of the page
range the item is defined for. startPage)Returns the page label range starting at the given page, or |
| public int | Returns: the number of page label ranges.Returns the number of page label ranges. |
| public void | setLabelItem(int
the 0-based index of the page representing the start of the
page label range. startPage, PDPageLabelRange the page label item to set. item)Sets the page label range beginning at the specified start page. |
| doc | back to summary |
|---|---|
| private final PDDocument doc | |
| labels | back to summary |
|---|---|
| private final Map<Integer, PDPageLabelRange> labels | |
| PDPageLabels | back to summary |
|---|---|
| public PDPageLabels(PDDocument document) Creates an empty page label dictionary for the given document.
Note that the page label dictionary won't be automatically added to the
document; you will still need to do it manually (see
| |
| PDPageLabels | back to summary |
|---|---|
| public PDPageLabels(PDDocument document, COSDictionary dict) throws IOException Creates an page label dictionary for a document using the information in the given COS dictionary.
Note that the page label dictionary won't be automatically added to the
document; you will still need to do it manually (see
| |
| computeLabels | back to summary |
|---|---|
| private void computeLabels(PDPageLabels. | |
| findLabels | back to summary |
|---|---|
| private void findLabels(PDNumberTreeNode node) throws IOException | |
| getCOSObject | back to summary |
|---|---|
| public COSBase getCOSObject() Implements org. Doc from org. Convert this standard java object to a COS object. | |
| getLabelsByPageIndices | back to summary |
|---|---|
| public String[] getLabelsByPageIndices() Returns a mapping with 0-based page indices as keys and corresponding page labels as values as an array. The array will have exactly as much entries as the document has pages.
| |
| getPageIndices | back to summary |
|---|---|
| public NavigableSet Get an ordered set of page indices having a page label range.
| |
| getPageIndicesByLabels | back to summary |
|---|---|
| public Map Returns a mapping with computed page labels as keys and corresponding 0-based page indices as values. The returned map will contain at most as much entries as the document has pages. Note If the document contains duplicate page labels, the returned map will contain less entries than the document has pages. The page index returned in this case is the highest index among all pages sharing the same label. | |
| getPageLabelRange | back to summary |
|---|---|
| public PDPageLabelRange getPageLabelRange(int startPage) Returns the page label range starting at the given page, or
| |
| getPageRangeCount | back to summary |
|---|---|
| public int getPageRangeCount() Returns the number of page label ranges. This will be always >= 1, as the required default entry for the page range starting at the first page is added automatically by this implementation (see PDF32000-1:2008, p. 375).
| |
| setLabelItem | back to summary |
|---|---|
| public void setLabelItem(int startPage, PDPageLabelRange item) Sets the page label range beginning at the specified start page.
| |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final PDPageLabelRange | |
| private final int | |
| private static final String[][] | ROMANS
Lookup table used by the |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| public boolean | |
| private static String | |
| private static String | |
| public String | |
| public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
| currentPage | back to summary |
|---|---|
| private int currentPage | |
| labelInfo | back to summary |
|---|---|
| private final PDPageLabelRange labelInfo | |
| numPages | back to summary |
|---|---|
| private final int numPages | |
| ROMANS | back to summary |
|---|---|
| private static final String[][] ROMANS Lookup table used by the | |
| LabelGenerator | back to summary |
|---|---|
| pack-priv LabelGenerator(PDPageLabelRange label, int pages) | |
| getNumber | back to summary |
|---|---|
| private String getNumber(int pageIndex, String style) | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| makeLetterLabel | back to summary |
|---|---|
| private static String makeLetterLabel(int num) a..z, aa..zz, aaa..zzz ... labeling as described in PDF32000-1:2008, Table 159, Page 375. | |
| makeRomanLabel | back to summary |
|---|---|
| private static String makeRomanLabel(int pageIndex) | |
| next | back to summary |
|---|---|
| public String next() Implements java. Doc from java. Returns the next element in the iteration. | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| newLabel | back to summary |
|---|---|
| public void newLabel(int pageIndex, String label) | |