Skip to content

getNumberOfNewLinesFromPreviousTextPosition #36

@Schagalaah

Description

@Schagalaah

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 );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions