PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
How to draw text vertically https://forum.pdfsharp.net/viewtopic.php?f=2&t=1795 |
Page 1 of 1 |
Author: | hgoussarova [ Tue Sep 27, 2011 8:53 pm ] |
Post subject: | How to draw text vertically |
Hi, I need to place text vertically into my pdf document. This document is one big image that I create on the fly and save as pdf. I am using DrawText method, but it does not let me control orientation. Could you please help. Thank you in advance for your response. Helen. |
Author: | Thomas Hoevel [ Wed Sep 28, 2011 7:13 am ] |
Post subject: | Re: How to draw text vertically |
Hi! Look at the "DrawImage (rotated)" section of this sample: http://www.pdfsharp.net/wiki/Graphics-sample.ashx With "RotateTransform" you can draw rotated text. |
Author: | hgoussarova [ Fri Sep 30, 2011 4:19 pm ] |
Post subject: | Re: How to draw text vertically |
Hi Thomas, The sample code you quoted shows how to rotate an image, but I need to rotate text. Is there a way to create image out of text? Thanks Helen. |
Author: | () => true [ Sat Oct 01, 2011 3:02 pm ] |
Post subject: | Re: How to draw text vertically |
hgoussarova wrote: The sample code you quoted shows how to rotate an image, but I need to rotate text. Transformations of the gfx apply to anything that is drawn (images and text).
|
Author: | hgoussarova [ Sun Oct 02, 2011 3:02 am ] |
Post subject: | Re: How to draw text vertically |
I am very new to graphics programming. this is my first graphical project. so could you please help me a bit. I have this main gfx where I add all my graphical elements to. Now, I will create another gfx with the line of text I need to rotate. I will rotate it using the techinque you mentioned. But how do I add this new gfx to a particular place in my main gfx? Thank you in advance for your help. Helen. |
Author: | () => true [ Sun Oct 02, 2011 8:56 am ] |
Post subject: | Re: How to draw text vertically |
You only need one gfx. You can call gfx.Save() before the transformation and gfx.Restore() after drawing the vertical text - the sample uses these functions in BeginBox/EndBox. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |