Rotation of 45 degree for Insert Text in PDF #2722
-
I am trying to insert text for landscape and potrait mode pages , but i noticed, we cannot do rotation on 45 degrees. Do we have any option to do. I noticed your previous codes , and tried this scenario , but no way to rotate at an angle of 45. Can you please help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is a typical "Discussions" post. Let me first convert it. |
Beta Was this translation helpful? Give feedback.
Simply use the
morph
parameter: you must providemorph=(point, matrix)
, wherepoint
is afitz.Point
to be used as a fixpoint andmatrix
afitz.Matrix
. This can be any any matrix withmatrix.e = matrix.f = 0
.So to show inserted text rotated by 45° around the insertion point do
page.insert_text(point, text, morph=(point, fitz.Matrix(45))
.