Get list of PDPageLabelRange?

2017-04-24 Thread Olivier Cailloux

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: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org



Re: OTFParser how to

2017-04-24 Thread Andreas Lehmkühler

> clifford  hat am 19. April 2017 um 18:12 
> geschrieben:
> 
> 
> When doing..
> java.io.FileInputStream fis = new java.io.FileInputStream(file1);
> OTFParser p = new OTFParser();
> OpenTypeFont otf = p.parse(fis);
> 
> and otf.isPostScript() is true how do I embed the font  as
> 
> PDType0Font.load(doc, otf, true); will cause a error later on of 
> "java.lang.UnsupportedOperationException: OTF fonts do not have a glyf 
> table" which is true as it dose not have a glyf table
PDFBox doesn't support embedding such otf fonts.

Andreas
> 
> 
> -- 
> 
> *Kind regards*
> 
> *Clifford Dann
> Paprika*
> 
> 
> T +44 (0)1732 811603
> www.paprika-software.com 
> Latters House, High Street, Hadlow, Tonbridge, Kent, TN11 0EF, United 
> Kingdom
> 
> Agency Software Worldwide Ltd.Registered in England and Wales 01665695
>

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