[ 
https://issues.apache.org/jira/browse/PDFBOX-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14005693#comment-14005693
 ] 

Juraj Lonc commented on PDFBOX-2089:
------------------------------------

OK, the plan B is to modify PDFStreamEngine and replace "matrix.getXScale()" 
with "Math.abs(matrix.getXScale())".

Width and height of character should be always positive number, right?

> Negative width of character
> ---------------------------
>
>                 Key: PDFBOX-2089
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2089
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Juraj Lonc
>         Attachments: PDFBOX-2089_Matrix.diff, negative_width.pdf
>
>
> This PDF contains text matrix:
> -10.5679 0 0 -11.4 459.0349 19.4155 Tm
> that causes IMHO wrong calculation of character width (and height).
> Width and height calculated in PDFStreamEngine are negative numbers, because 
> textMatrix.getXScale() gives negative value.
> I think it should be fixed in Matrix.getXScale() and Matrix.getYScale(). 
> Returning value should be fixed by Math.abs()



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to