Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDFLayoutTextStripper StringIndexOutOfBoundsException #20

Open
gustavopiucco opened this issue Apr 18, 2018 · 3 comments
Open

PDFLayoutTextStripper StringIndexOutOfBoundsException #20

gustavopiucco opened this issue Apr 18, 2018 · 3 comments

Comments

@gustavopiucco
Copy link

I am using PDFLayoutTextStripper with some PDF's and works perfecly, but today I came across the attached PDF returning the following exception:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.charAt(String.java:658)
at com.xxx.pdfbox.TextLine.isSpaceCharacterAtIndex(TextLine.java:58)

tim.pdf

@JonathanLink
Copy link
Owner

JonathanLink commented Apr 18, 2018

Hello,
Thank you for reporting this bug. I fixed it in the next version that I am going to release soon.
Meanwhile you can pull the code of the dev branch here: https://github.com/JonathanLink/PDFLayoutTextStripper/tree/dev

@gustavopiucco
Copy link
Author

Hello Jonathan,

I tested with the dev branch and the exception is not thrown anymore, but the output only shows from page 20~25+

@abhineet-bansal
Copy link

Hi Jonathan,

Did you end up resolving the issue and releasing an updated version? I am facing this issue with all the PDFs I am trying to parse (they are all generated by the same vendor for different users).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants