pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Get page label given page index?
Date Sun, 06 Aug 2017 19:30:56 GMT
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.


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

View raw message