Dear list,
How can I obtain, from a given PDDocument, a list of the page label ranges that it contains?

Here is an example where I obtain the first PDPageLabelRange. How to retrieve the other ones? I realize I can iterate over all pages of the document and query for the possible existence of a pageLabelRange at each page, but I suspect there must be a more efficient (and simpler) way.

try (PDDocument document = PDDocument.load(…)) {
    assert !document.isEncrypted();
    PDDocumentCatalog catalog = document.getDocumentCatalog();
    PDPageLabels labels = catalog.getPageLabels();
    PDPageLabelRange pageLabelRange = labels.getPageLabelRange(0);
}

Thanks.
Olivier


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to