You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Villu Ruusmann (JIRA)" <ji...@apache.org> on 2009/12/12 17:49:18 UTC

[jira] Created: (PDFBOX-583) TextPosition#getIndividualWidths returns negative values

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.


[jira] Resolved: (PDFBOX-583) TextPosition#getIndividualWidths returns negative values

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler resolved PDFBOX-583.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.0

Sounds reasonable. I've added your changes with version 892344.

Thanks to Villu for the contribution

> 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
>             Fix For: 1.0.0
>
>
> 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.