TextPosition#getIndividualWidths returns negative values
--------------------------------------------------------
Key: PDFBOX-583
URL: https://issues.apache.org/jira/browse/PDFBOX-583
Project: PDFBox
Issue Type: Bug
Components: Text extraction, Utilities
Affects Versions: 1.0.0
Reporter: Villu Ruusmann
Priority: Critical
I was notified by Peter Costello (peterwcostello at gmail dot com) that there
has been a regression in PDFStreamSource, which results in TextPosition
returning negative individual character widths. This could happen, because I
only tested with TextPosition#getWidth(), but not with
TextPosition#getIndividualWidths(). Below is the original message:
Bug introduced to
/pdfbox/trunk/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java on
revision 885904
Line 422 changed to:
float widthText = glyphMatrixStDisp.getXPosition() -
glyphMatrixEndDisp.getXPosition();
Polarity of width now negative. Should be
float widthText = glyphMatrixEndDisp.getXPosition() -
glyphMatrixStDisp.getXPosition();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.