PDFBox returns missing descendant font dictionary

天大地大妈咪最大 提交于 2021-01-29 14:37:36

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!