Rotating Rect #2112
-
I have the coordinates of a rectangle from a landscape pdf in which I am trying to insert an image or a checkbox, but it's |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Unfortunately, your images seem to cover some of your text. So I could not read all of it I think. pprint((page.transformation_matrix,page.rotation_matrix,page.derotation_matrix))
(Matrix(1.0, 0.0, 0.0, -1.0, 0.0, 842.0),
Matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0),
Matrix(1.0, -0.0, -0.0, 1.0, 0.0, 0.0))
page.set_rotation(90)
pprint((page.transformation_matrix,page.rotation_matrix,page.derotation_matrix))
(Matrix(1.0, 0.0, 0.0, -1.0, 0.0, 842.0),
Matrix(0.0, 1.0, -1.0, 0.0, 842.0, 0.0),
Matrix(0.0, -1.0, 1.0, 0.0, -0.0, 842.0)) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help. this helped me with the coordinates. Is there any way to rotate a checkbox after placing them? |
Beta Was this translation helpful? Give feedback.
-
No, there is no such option. |
Beta Was this translation helpful? Give feedback.
Unfortunately, your images seem to cover some of your text. So I could not read all of it I think.
But some comment right away:
All coordinates from text extractions, line art, image bboxes, whatever are relative to the unrotated page.
There are
Page
attributes.rotation_matrix
and.derotation_matrix
to compute between the respective coordinate systems: