[
https://issues.apache.org/jira/browse/PDFBOX-4355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr resolved PDFBOX-4355.
-------------------------------------
Resolution: Fixed
Assignee: Tilman Hausherr
Fix Version/s: 3.0.0 PDFBox
2.0.13
> PDFTextStripperByArea dies on Chinese/Japanese files
> ----------------------------------------------------
>
> Key: PDFBOX-4355
> URL: https://issues.apache.org/jira/browse/PDFBOX-4355
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.12
> Reporter: Ilya Kantor
> Assignee: Tilman Hausherr
> Priority: Minor
> Labels: type3
> Fix For: 2.0.13, 3.0.0 PDFBox
>
> Attachments: output.pdf, output.txt
>
>
> {{I'm using PDFTextStripperByArea, this code makes it die:}}
> stripper.extractRegions(page);
> Assuming, the language is Chinese or Japanese, that's the error:
> ===========
> Oct 19, 2018 1:24:50 AM org.apache.pdfbox.pdmodel.font.PDFont getSpaceWidth
> SEVERE: Can't determine the width of the space character, assuming 250
> java.io.IOException: Unexpected end of stream
> at
> org.apache.pdfbox.pdmodel.font.PDType3CharProc.getWidth(PDType3CharProc.java:170)
> at
> org.apache.pdfbox.pdmodel.font.PDType3Font.getWidthFromFont(PDType3Font.java:165)
> at org.apache.pdfbox.pdmodel.font.PDFont.getSpaceWidth(PDFont.java:547)
> at
> org.apache.pdfbox.text.LegacyPDFStreamEngine.showGlyph(LegacyPDFStreamEngine.java:265)
> at
> org.apache.pdfbox.contentstream.PDFStreamEngine.showText(PDFStreamEngine.java:734)
> at
> org.apache.pdfbox.contentstream.PDFStreamEngine.showTextString(PDFStreamEngine.java:595)
> =========
> Should I use something else instead of PDFTextStripperByArea?
> Let me know if more information needed. I attached the PDF file.[^output.pdf]
> ^====^
> *To reproduce use the attached above output.pdf and the standard PDFBox app:*
> java -jar pdfbox-app-2.0.12.jar ExtractText output.pdf
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]