On 01.04.2025 09:59, Stefan wrote:
After some more digging I think the issue I see comes from SetMatrix.java where 
a Matrix is instantiated from a set of COSNumber values.

--> The incoming parameters from a PDF file are
     "scaleX shearX shearY scaleY transX transY Tm"

I don't see such a comment... here's the PDF specification:

Java itself writes the matrix differently (look in both at the multiplication of the y value for to get x', it's c in PDF and m01 in java )

Now if you still think our code is wrong, tell me what should be changed and I'll run a test (I just did and text extraction failed) and tell you the result.

Btw the angle formula is used in production, for the "rotation magic" option in ExtractText, but only to detect identical angles.

Tilman

Reply via email to