[
https://issues.apache.org/jira/browse/PDFBOX-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004859#comment-16004859
]
Tilman Hausherr commented on PDFBOX-3782:
-----------------------------------------
Some background: in this font, the space width is not defined. So a default
width is taken, which is 600 in this font. That is unusually large. The "0" has
500, and in fonts the space has usually a width around 250. Because of that
large space width, PDFBox assumes that the area between glyphs isn't a space.
Now you may argue: "I don't care, Adobe does it correctly so I want it here
too".
Our algorithm does a lot of "magic" and changing it is risky, because it may
degrade files that were good... I don't have any good idea right now, but will
keep this open and add your file to my test set.
> Text extraction loses whitespace
> --------------------------------
>
> Key: PDFBOX-3782
> URL: https://issues.apache.org/jira/browse/PDFBOX-3782
> Project: PDFBox
> Issue Type: Bug
> Components: Text extraction
> Affects Versions: 2.0.4, 2.0.5, 2.0.6
> Environment: Java/Tika
> Reporter: Tony Bray
> Priority: Minor
> Attachments: PDFBOX-3782-reduced.pdf, Test doc - Japanese writing
> system - Kanji Hiragana Katakana.pdf, Test doc - Japanese writing system -
> Kanji Hiragana Katakana.txt
>
>
> I have a PDF document that I am using Tika/PDFBox to extract the content. In
> several areas, the content extracted loses the whitespace, causing a
> tokenization problem for indexing/searching.
> I have attached the original document and the text output. If you search
> (Ctrl+f) the text document for "Another example". Here you will see no space
> after "is" and the Japanese text. The same issue shows for
> "whichmeans"eraser"" at the end of the sentence.
> Another example is消しゴム (Rō- maji: keshigomu) whichmeans“eraser”
> I get the warning "WARNING: No Unicode mapping for CID+0 (0) in font
> RGOFPX+IPAexMincho" during extraction but have been unable to find any
> information on it.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]