PDFsharp & MigraDoc Foundation http://forum.pdfsharp.com/ |
|
problems rotating a string http://forum.pdfsharp.com/viewtopic.php?f=2&t=4690 |
Page 1 of 1 |
Author: | lucamorelli [ Fri Oct 04, 2024 10:42 am ] |
Post subject: | problems rotating a string |
Hi, I have to work with a few portrait pdf with LandScape orientation and Rotate = 270, result I think of the scanning process of the document. I need to print text in this pdf with the normal orientation, so I have to rotate 90 degress, but I tried both the RotateTransform and RotateAtTransform and the result is hard to understand. How can I plot strings to the 4 angles of the document? Is there any documentation available? |
Author: | TH-Soft [ Fri Oct 04, 2024 11:11 am ] |
Post subject: | Re: problems rotating a string |
lucamorelli wrote: I need to print text in this pdf with the normal orientation, so I have to rotate 90 degress, but I tried both the RotateTransform and RotateAtTransform and the result is hard to understand. You don't show any code.Don't forget to call Save and Restore. See also: https://www.pdfsharp.net/wiki/XForms-sa ... ?HL=rotate |
Author: | Wojtec320 [ Fri Oct 04, 2024 11:40 am ] |
Post subject: | Re: problems rotating a string |
Hey, I had the same problem with landscape scanned PDFs. Rotations are tricky! First: try using `RotateTransform` but remember to use `SaveState()` before and `RestoreState()` after each rotation. This keeps things stable. Also, don’t forget to set `Graphics.PageUnit` to the right unit. Just to add, documentation isn't great, but check out the [Sample Code](https://pdfsharp.net/wiki/PDFsharpSamples.ashx), you'll find examples with rotations there :-) |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |