As per my previous post I am trying to put a logo on each page of a PDF. I want the logo to be rotated (to a user configurable degree) and centered on the page.
Now I can get the page width and height, and I can get the text width and height from the FormattedText object. So centering the text is easy when it has not been rotated.
Of course when I rotate the text the width and height of the text are of no use to me, I need the width and height of the bounding box which I'm struggling with.
So my questions are:
- Is there an easy way to center rotated text when using a stamp.
- If not can you provide me with a calculation that will enable be to set the origin correctly.
This needs to work for any angle of rotation.
P.S This is the last problem I need to solve and then you've got another sale....