Am 06.08.2017 um 19:31 schrieb Olivier Cailloux:
Dear list,

Can I obtain from the pdf box library a page label (e.g. "iv") given a page index and a set of page label ranges?

I know I can obtain page labels given a pdf document (using catalog.getPageLabels().getLabelsByPageIndices()), but I have no pdf document handy, only a set of page label ranges. I think LabelGenerator does something similar, though not exactly (it generates the pages in order), and it is private.

I am thinking of copying code in LabelGenerator and modify it to suit my needs. But I’d like to make sure there’s no cleaner way.

If you looked into the source code, then I'm sure you looked at the PDPageLabel API before and didn't find what you wanted. Thus copying and adjusting the source code to your needs sounds like a good idea.

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to