[
https://issues.apache.org/jira/browse/PDFBOX-5390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17508573#comment-17508573
]
flywire commented on PDFBOX-5390:
---------------------------------
The test passed but I don't think it was very useful. v2.0.25 is more
reasonable.
>java -jar pdfbox-app-2.0.26.jar TextToPDF -standardFont Courier test.pdf
>test.txt
Using the test code in my post above v2.0.26 strips all leading and trailing
spaces from the line so indented lines are lost but the blank line is retained.
>java -jar pdfbox-app-2.0.26.jar ExtractText test.pdf test1.txt
The above command run on the pdf generated by pdfbox-app-2.0.26.jar discards
the blank line.
{noformat}
"Lorem ipsum dolor sit amet,\n"
"consectetur adipiscing\n"
"elit. sed do eiusmod\n"
{noformat}
The above command run on the pdf generated by pdfbox-app-2.0.25.jar gives the
same output as pdfbox-app-2.0.25.jar (ie strip all trailing spaces and add a
space and CRLF).
{noformat}
"Lorem ipsum dolor sit amet, \n"
" consectetur adipiscing \n"
" \n"
"elit. sed do eiusmod \n"
{noformat}
----
I'd expect TextToPDF to retain leading and trailing whitespace characters, and
a space character on blank lines would be a good option to retain blank lines.
> TextToPDF appends space to each line
> ------------------------------------
>
> Key: PDFBOX-5390
> URL: https://issues.apache.org/jira/browse/PDFBOX-5390
> Project: PDFBox
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.0.25
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Minor
> Fix For: 2.0.26, 3.0.0 PDFBox
>
>
> As reported by "flywire" on the users mailing list.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]