[
https://issues.apache.org/jira/browse/PDFBOX-3495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15488304#comment-15488304
]
John Hewson commented on PDFBOX-3495:
-------------------------------------
Yes, it's wrong. Pretty much everything about TextPosition handling code is
wrong. However multiplying by the CTM is also wrong - you need to take both the
Text Matrix and the CTM into account (the product of these two matrices is
known as the Text Rendering Matrix, and it is in fact a parameter to showGlyph).
All TextPosition related code is legacy code and we're in a situation where we
can't really fix the current API without throwing it away. Unfortunately a lot
of people are depending on these broken calculations. Longer term our goal is
to create a new text extractor.
As a workaround, you can multiply the so-called "fontSizeInPt" by
ctm.getScalingFactorX() to apply the CTM scaling.
> fontSize calculation wrong
> --------------------------
>
> Key: PDFBOX-3495
> URL: https://issues.apache.org/jira/browse/PDFBOX-3495
> Project: PDFBox
> Issue Type: Bug
> Components: Text extraction
> Affects Versions: 2.0.2
> Reporter: Arthur Freitas e Menezes
> Attachments: de_judITRF.pdf
>
>
> In showGlyph method of PDFTextStreamEngine class, line 306. fontSizeInPt
> would not be " fontSize * ctm.getScalingFactorX ()" ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]