[ https://issues.apache.org/jira/browse/PDFBOX-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14005691#comment-14005691 ]
Tilman Hausherr commented on PDFBOX-2089: ----------------------------------------- Touching Matrix.getXScale() and Matrix.getYScale() is risky, see PDFBOX-1931. And a negative scale isn't always wrong, e.g. for a flip. > 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)