<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : TQuickPDF0813.DrawText</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : TQuickPDF0813.DrawText]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 26 May 2026 16:41:35 +0000</pubDate>
  <lastBuildDate>Tue, 20 Dec 2011 14:31:59 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=2074</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[TQuickPDF0813.DrawText : Hi Micha,Here an overview on the...]]></title>
   <link>http://www.quickpdf.org/forum/tquickpdf0813drawtext_topic2074_post8841.html#8841</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1569">edvoigt</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 20 Dec 11 at 2:31PM<br /><br />Hi Micha,<br><br>Here an overview on the properties around Textheight:<img src="http://www.edvoigt.de/extra/2011-12-20%2014h40_48.png" height="161" width="746" border="0" /><br><br>To have text of different size readable in a line, all is drawn on the baseline.&nbsp; It's so in Word, in PDF and it makes sense. But inside a technical drawing, you may want a spezial alignment and so you need some calculations around size. You may get all information by GetTextAscent, GetTextDescent, GetTextBound(...), GetTextHeight, GetTextWidth. But keep in mind, that SetTextSize works ever with points.<br><br>Here a codesnippet for the above painting in D7:<br><br><font face="Courier New, Courier, mono">var<br>&nbsp; QP: TQuickPDF;<br>&nbsp; s: string;<br>&nbsp; x, y, <br>&nbsp; tf, ta, td, tt, th, ts, tw: double;<br>begin<br>&nbsp; QP := TQuickPDF.Create;<br>&nbsp; QP.UnlockKey(...<br>&nbsp; QP.SetMeasurementUnits(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // millimeters<br>&nbsp; QP.SetPageDimensions(210, 297); // DIN A4<br>&nbsp; QP.SetOrigin(0);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // bottomleft<br>&nbsp; x := 20; y := 20;<br>&nbsp; s := 'Ä happy ÉgÊ¦Ç';&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // to have real things on all lines<br><br>&nbsp; QP.AddStandardFont(11);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // as you like<br>&nbsp; tf := 24*72/25.4;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 24 mm as points<br>&nbsp; QP.SetTextSize(tf);<br>&nbsp; ta := QP.GetTextAscent;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // get all we can need<br>&nbsp; td := QP.GetTextDescent;<br>&nbsp; tt := QP.GetTextBound(2);<br>&nbsp; th := QP.GetTextHeight;<br>&nbsp; ts := QP.GetTextSize*25.4/72;&nbsp;&nbsp; // points to mm<br>&nbsp; tw := QP.GetTextWidth(s);<br>&nbsp; QP.DrawText(x, y, s);<br><br>&nbsp; tf := 4*72/25.4;</font><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 4 mm as points</font><br><font face="Courier New, Courier, mono">&nbsp; QP.SetTextSize(tf);<br><br>&nbsp; QP.SetLineWidth(0.1);<br>&nbsp; QP.SetLineColor(1, 0, 0);&nbsp; &nbsp; &nbsp; // Baseline<br>&nbsp; QP.DrawLine(x-10, y, x+tw+5, y); QP.DrawText(x+tw+6, y, 'Baseline');<br>&nbsp; QP.SetLineColor(0, 1, 0);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Ascent<br>&nbsp; QP.DrawLine(x-10, y+ta, x+tw+5, y+ta); QP.DrawText(x+tw+6, y+ta, 'Ascent');<br>&nbsp; QP.SetLineColor(0, 0, 1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Descent = abs(Bottom)<br>&nbsp; QP.DrawLine(x-10, y+td, x+tw+5, y+td); QP.DrawText(x+tw+6, y+td, 'Descent');<br>&nbsp; QP.SetLineColor(0, 0.5, 0.5);&nbsp; // Top<br>&nbsp; QP.DrawLine(x-10, y+tt, x+tw+5, y+tt); QP.DrawText(x+tw+6, y+tt, 'Top');<br><br>&nbsp; QP.AddStandardFont(4);<br>&nbsp; QP.SetTextSize(tf);<br>&nbsp; QP.DrawText(x, y-10, Format('Ascent=%.2f&nbsp; Descent=%.2f&nbsp; Top=%.2f&nbsp; Textsize=%.2f Delta=%.2f',&#091;ta, td, tt, ts, tt-ta&#093;));<br></font><br><br>Cheers,<br><br>Werner<br><span style="font-size:10px"><br /><br />Edited by edvoigt - 05 Nov 13 at 11:35AM</span>]]>
   </description>
   <pubDate>Tue, 20 Dec 2011 14:31:59 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/tquickpdf0813drawtext_topic2074_post8841.html#8841</guid>
  </item> 
  <item>
   <title><![CDATA[TQuickPDF0813.DrawText : Text is a PDF file is drawn on...]]></title>
   <link>http://www.quickpdf.org/forum/tquickpdf0813drawtext_topic2074_post8834.html#8834</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 19 Dec 11 at 10:04PM<br /><br /><br><div>Text is a PDF file is drawn on the baseline. &nbsp;If you want to draw text from the top of the font cell or the top of the characters then you would use either GetTextHeight or GetTextAscent</div><div><br></div><div><div>QP.SetOrigin(1);</div><div>QP.DrawLine(30, 30, 400, 30);</div><div>QP.DrawText(30, 30 - QP.GetTextHeight(), "Hello World using text height");</div><div><div><br></div><div>QP.DrawLine(30, 60, 400, 60);</div><div>QP.DrawText(30, 60 - QP.GetTextAscent(), "Hello World using ascent");</div><div><br></div></div></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 19 Dec 2011 22:04:14 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/tquickpdf0813drawtext_topic2074_post8834.html#8834</guid>
  </item> 
  <item>
   <title><![CDATA[TQuickPDF0813.DrawText : Hi Micha!Perhaps it&amp;#039;s better...]]></title>
   <link>http://www.quickpdf.org/forum/tquickpdf0813drawtext_topic2074_post8831.html#8831</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 18 Dec 11 at 8:15PM<br /><br />Hi Micha!<br><br>Perhaps it's better to post the used code-snippet.<br>If you're asking about orientation you should use SetOrigin.<br>Please read here:<br>http://www.quickpdflibrary.com/help/quickpdf/SetOrigin.php<br><br>Cheers and welcome here,<br>Ingo<br><br>]]>
   </description>
   <pubDate>Sun, 18 Dec 2011 20:15:41 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/tquickpdf0813drawtext_topic2074_post8831.html#8831</guid>
  </item> 
  <item>
   <title><![CDATA[TQuickPDF0813.DrawText :   hello,im using delphi 7whenusing...]]></title>
   <link>http://www.quickpdf.org/forum/tquickpdf0813drawtext_topic2074_post8830.html#8830</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1790">micha</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 18 Dec 11 at 3:48PM<br /><br />hello,<div>&nbsp;</div><div>im using delphi 7</div><div>&nbsp;</div><div>when&nbsp;using the DrawText function the text is drawn over the&nbsp;y position </div><div>does anyone know how to draw the text under the&nbsp;y position ?<font size="1" face="C&#111;nsolas"><font size="1" face="C&#111;nsolas"></div></font></font><div>&nbsp;</div><div>thanks micha</div>]]>
   </description>
   <pubDate>Sun, 18 Dec 2011 15:48:46 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/tquickpdf0813drawtext_topic2074_post8830.html#8830</guid>
  </item> 
 </channel>
</rss>