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

Andreas Lehmkühler commented on PDFBOX-909:
-------------------------------------------

I'm pretty sure that my changes are right. There are only 2 possible kinds of 
matrices within the PDF format, 3x3 and 2x3, so that IMO we don't need a 
special constructor. According to the reference the FontMatrix always consists 
of 6 values, e.g. [0.001 0 0 0.001 0 0]. 

But to cut a long story short there is an issue in 
PageDrawer#processTextPosition():

at.scale(fontMatrix.getValue(0, 0) * 1000f, fontMatrix.getValue(1, 0) * 1000f); 

The second scaling factor has to be: fontMatrix.getValue(1, 1)

Obviously the author of that code (I guess it was me) used a "workaround" for 
the wrong PDMatrix implementation without thinking about it. 

If you liked to fix it, go ahead. Otherwise I'll fix that later when I'm back 
home.

> Add support for a 6 element matrix
> ----------------------------------
>
>                 Key: PDFBOX-909
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-909
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 1.2.0, 1.2.1, 1.3.1
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.4.0
>
>
> The PDMatrix class only supports 3x3 matrices.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to