PDFLayoutTextStripper icon indicating copy to clipboard operation
PDFLayoutTextStripper copied to clipboard

getNumberOfNewLinesFromPreviousTextPosition

Open Schagalaah opened this issue 6 years ago • 1 comments

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

Schagalaah avatar Oct 11 '19 09:10 Schagalaah

see pull request #52 and  #18

antsfiles avatar Dec 14 '24 21:12 antsfiles