|
Rank: Newbie Groups: Member
Joined: 2/19/2012 Posts: 4
|
Hi!) Please, answer me. i have some text( "Bla bla bla bla") in PdfTextContent, i use font as ("Lucida Console",Size = 8)
how to know width of this text, which already is rendered in the pdf document?
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, No. There is no way to get the size from PdfTextContent. You can only get the text if you use HTML to PDF: http://www.essentialobjects.com/doc/4/eo.pdf.htmlelement.size.aspxYou would run HTML to PDF to get an HtmlToPdfResult object, from that object you can get the HtmlElement object. You can then get the element's size. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/19/2012 Posts: 4
|
HI,
This solution has no wanted results. What you think about this: can i use System.Windows.Forms.TextRenderer.MeasureText() method for calculating text width, which already is rendered in the pdf document?
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
No. Using HtmlElement.Size property is the only way for you to get text size.
Thanks
|
|