问题
when extracting the first page of a PDF I get java.io.IOException: Missing descendant font dictionary
.
The extraction code is the following:
PDDocument pdDocument = PDDocument.load(file);
PageExtractor pageExtractor = new PageExtractor(pdDocument, 1, 1);
PDDocument singlePageDocument = pageExtractor.extract();
It only happens with few PDFs and the error points to the Fonts definitions, but I am unclear on how fonts in PDF are processed by Apache PDFBox (using version v2.0.18).
Any tip?
Thanks
来源:https://stackoverflow.com/questions/60317866/pdfbox-returns-missing-descendant-font-dictionary