Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
None
-
None
-
None
-
None
Description
Hello Team,
We are using customized version of 0.7.2 pdfbox and are getting following error while parsing the pdf file.
Caused by: java.lang.NullPointerExceptionCaused by: java.lang.NullPointerException at org.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:194) at org.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:182) at org.pdfbox.pdmodel.PDDocumentCatalog.getAllPages(PDDocumentCatalog.java:162) at org.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:220) at ch.ergon.lisa.filter.pdf.PdfTextToXml.convert(PdfTextToXml.java:107) at ch.ergon.lisa.filter.pdf.PdfUtils.pdfToXml(PdfUtils.java:75)
This is a legacy code and kindly let us know if we can fix this issue in this version as we are not able to change the code for the project.
Earlier CMAP version from Fontbox was being used and now CMAP from pdfbox is being use which solved the below error but now getting the nullpointer error.
Exception in thread "main" java.io.IOException: Error: expected hex character and not :32
at org.fontbox.cmap.CMapParser.parseNextToken(CMapParser.java:330)
at org.fontbox.cmap.CMapParser.parseNextToken(CMapParser.java:286)
at org.fontbox.cmap.CMapParser.parse(CMapParser.java:178)
at org.pdfbox.pdmodel.font.PDFont.parseCmap(PDFont.java:561)