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

getNumberOfNewLinesFromPreviousTextPosition #36

Open
Schagalaah opened this issue Oct 11, 2019 · 1 comment
Open

getNumberOfNewLinesFromPreviousTextPosition #36

Schagalaah opened this issue Oct 11, 2019 · 1 comment

Comments

@Schagalaah
Copy link

If height is 0 (can happen in some documents) the variable ""int numberOfLines" will be 2147483647 (Integer.MAX_VALUE). This will resolut in adding too much empty lines.

quick dirty fix but it would be better to find out why height is sometimes 0.
if(height==0){height=1;};
before
int numberOfLines = (int) (Math.floor( textYPosition - previousTextYPosition) / height );

@antsfiles
Copy link

see pull request #52 and  #18

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

2 participants