You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to rotate a block of text vertically in my PDF document and I have a hard time to understand how TransformRoate() operates - especially how to position the rotated element on my page. It seems that the X and Y parameters work in a different way that I would expect it.
I would expect that I have a piece of text that is starting centered on the page and is rotated from there in 10° increments. But in reallity it seem that the text is skewed in some weird way, even though the X and Y parameters are always 0. The result looks like this:
Does anybody has some advice or pointer to what I am doing wrong? As final goal I'd like to position vertical text boxes and a QR code in the upper left corner of the document, but given that I am basically blindly guessing right now where the rotated element would end up, I am not getting reliable re-producable results.
Any assistance is highly appreciated.
The text was updated successfully, but these errors were encountered:
I believe I was able to figure it out by now. I think my error was to think that the pdf.SetXY(210.0/2, 297.0/2) would be enough to manifest the position of the transformed element and I should use 0 as value for X and Y in the TransformRotate(). When I specify the same XY coordinates in the TransformRotate() the result looks like what I was looking for. Sorry for the confusion.
Hi,
I am currently trying to rotate a block of text vertically in my PDF document and I have a hard time to understand how
TransformRoate()
operates - especially how to position the rotated element on my page. It seems that the X and Y parameters work in a different way that I would expect it.Here is some example code I wrote:
I would expect that I have a piece of text that is starting centered on the page and is rotated from there in 10° increments. But in reallity it seem that the text is skewed in some weird way, even though the X and Y parameters are always 0. The result looks like this:
Does anybody has some advice or pointer to what I am doing wrong? As final goal I'd like to position vertical text boxes and a QR code in the upper left corner of the document, but given that I am basically blindly guessing right now where the rotated element would end up, I am not getting reliable re-producable results.
Any assistance is highly appreciated.
The text was updated successfully, but these errors were encountered: