Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change PdfPageLabels.getPageLabels() to scope prefixes to the range
they are defined for While reading a PDF generated by Adobe InDesign CS6 using the Adobe PDF Library 10.0.1 which included several page label sections I noticed iText was keeping the prefix applied to subsequent sections in the values return by PdfPageLabels.getPageLabels(), even when the key was omitted in the following page label dictionary entries. According to the PDF Reference 1.7, Table 8.10 says that /P is an optional label prefix for page labels in this range. PDF Readers I have installed scope the prfix only to the range it is specified. This change empties out the prefix field to give behaviour I think aligns with the reference and my experience of other PDF readers. I am not aware of any potential regression issues introduced by this change, existing page label dictionaries created by iText set /P to an empty string so this will only affect reading PDFs with partially prefixed page label ranges as far as I know.
- Loading branch information