[
https://issues.apache.org/jira/browse/PDFBOX-4250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16522775#comment-16522775
]
Bob Swanson commented on PDFBOX-4250:
-------------------------------------
We gave up on trying to restore the original item. The test file that I linked
to, is easy to reproduce. I created a simple file in LibreOffice (happy to
share that if you like) with several fonts. I used "cups-pdf" to make the PDF
file that is the example. Exporting PDF from LibreOffice worked fine.
So I believe that the problem lies in cups-pdf and/or LibreOffice. The question
now is, how to report the bug for these products, rather than bothering you
about PDFBox.
> PDF File with embedded fonts: text extraction fails or returns junk characters
> ------------------------------------------------------------------------------
>
> Key: PDFBOX-4250
> URL: https://issues.apache.org/jira/browse/PDFBOX-4250
> Project: PDFBox
> Issue Type: Bug
> Components: Text extraction
> Affects Versions: 2.0.9
> Reporter: Bob Swanson
> Priority: Major
>
> One of the people that I support created a PDF file from an LibreOffice
> document, and then misplaced the original document. I believed that I could
> use PDFBox to extract the text from the PDF, and at least provide that
> information to the user.
>
When I ran the text extractor from the "app" jar, on their PDF file I got
> the following types of messages (many):
>
...
> Jun 13, 2018 5:38:43 PM
> org.apache.pdfbox.pdmodel.font.PDSimple
> ont toUnicode
> WARNING: No Unicode mapping for 7 (7) in
> font EXIRGE+Ubuntu
> Jun 13, 2018 5:38:43 PM
> org.apache.pdfbox.pdmodel.font.PDSimpleont toUnicode
> WARNING: No Unicode mapping for 8 (8) in
> font EXIRGE+Ubuntu
> Jun 13, 2018 5:38:43 PM
> org.apache.pdfbox.pdmodel.font.PDSimple
> ont toUnicode
> WARNING: No Unicode mapping for 1 (1) in
> font JTPICY+AndaleMono
> Jun 13, 2018 5:38:43 PM
> org.apache.pdfbox.pdmodel.font.PDSimple
> ont toUnicode
> ...
>
The resulting "txt" file is just binary numbers, unless the font is one of
> the "standard". I ran
> the debugger on the PDF file and saw that several fonts were embedded, and
> thus used low numbers for encoding (1,2,3, etc).
>
When viewed, the PDF file looks good, but nothing can be copied or pasted
> from the display (again,standard font seems OK).
>
The original file was of a sensitive nature, so I was able to re-create the
> problem with a simpler file.
>
Running on Ubuntu 16.04
> LibreOffice was used to "print" on the cups-pdf "printer" (which may be part
> of the problem).
>
Text extract was attempted with pdfbox-app-2.0.9.jar
>
PDF file is at:
>
http://swansongrp.com/misc/mytest3.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]