pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PDFBOX-4355) PDFTextStripperByArea dies on Chinese/Japanese files
Date Fri, 19 Oct 2018 04:03:00 GMT

     [ https://issues.apache.org/jira/browse/PDFBOX-4355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tilman Hausherr updated PDFBOX-4355:
------------------------------------
    Attachment: output.txt

> PDFTextStripperByArea dies on Chinese/Japanese files
> ----------------------------------------------------
>
>                 Key: PDFBOX-4355
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4355
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.12
>            Reporter: Ilya Kantor
>            Priority: Critical
>         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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Mime
View raw message