You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Jira)" <ji...@apache.org> on 2020/02/05 06:08:00 UTC
[jira] [Updated] (PDFBOX-4760) wordSeparator not being inserted
when line ends with " "
[ https://issues.apache.org/jira/browse/PDFBOX-4760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler updated PDFBOX-4760:
---------------------------------------
Fix Version/s: 3.0.0 PDFBox
2.0.19
> wordSeparator not being inserted when line ends with " "
> --------------------------------------------------------
>
> Key: PDFBOX-4760
> URL: https://issues.apache.org/jira/browse/PDFBOX-4760
> Project: PDFBox
> Issue Type: Bug
> Components: Text extraction
> Affects Versions: 2.0.18
> Reporter: John Gesimondo
> Priority: Major
> Fix For: 2.0.19, 3.0.0 PDFBox
>
>
> If you set the wordSeparator to something other than space (like "\t") for instance, but the word happens to end with " ", it won't add the designated wordSeparator.
> That's because in the LOC that adds the word separator it is hard coded that if the line ends with " ", the word separator should be skipped. This is not proper because it assumes you are using " " word separator, but this is a configurable option.
> [https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java#L639]
> fix: change {{.endsWith(" ")}} to {{.endsWith(wordSeparator)}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org