<?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 : Vertical position after DrawMultiLineText</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 : Sample Code : Vertical position after DrawMultiLineText]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 11 May 2026 23:16:35 +0000</pubDate>
  <lastBuildDate>Thu, 13 Oct 2011 16:27:30 +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=1754</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[Vertical position after DrawMultiLineText :  Here is a solution-idea in Delphi....]]></title>
   <link>http://www.quickpdf.org/forum/vertical-position-after-drawmultilinetext_topic1754_post8491.html#8491</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1569">edvoigt</a><br /><strong>Subject:</strong> 1754<br /><strong>Posted:</strong> 13 Oct 11 at 4:27PM<br /><br />Here is a solution-idea in Delphi. But the intention should come clear.<br>We need Informations like how much lines and how high. Nothing more. Little bit more is to do, if the text should fit in a given width. This is shown.<br><br>The code:<br><br><font face="Courier New, Courier, mono">var<br>&nbsp; QP: TQuickPDF;<br>&nbsp; s: string;<br>&nbsp; n: integer;<br>&nbsp; hb, h, sizey: double;<br>begin<br>&nbsp; QP := TQuickPDF.Create;<br>&nbsp; QP.UnlockKey('your key'); <br>&nbsp; QP.SetOrigin(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // topleft<br>&nbsp; QP.SetMeasurementUnits(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // millimeters<br>&nbsp; QP.SetPageDimensions(210, 297); // DIN A4<br>&nbsp; QP.AddStandardFont(8);<br>&nbsp; QP.SetTextSize(16);<br>&nbsp; s := 'This is the Text, which will be wrapped. Therefore we have to find out,'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +' how much lines are there after wrapping. Then we calc the y-size of a '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +'textbox.'+#13#10<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +'Here is a new line starting. We may see how high is a line and so we '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +'find out what we need to know. Now you are able to count how much lines '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +'fill the place on the page. So build new pages for the remainig lines '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +'and figure out wether is there enough space for your image or not.'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +#13#10+#13#10<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +'It is better to use the GetWrappedtext-function to split the text into'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +' portions of lines depending on the y-size. It makes a little more work.';<br>&nbsp; n := QP.GetWrappedTextLineCount(160, s);<br>&nbsp; h := QP.GetTextHeight;<br>&nbsp; hb := QP.GetTextBound(2);&nbsp; // height over baseline because baseline is textstart<br>&nbsp; sizey := n*h; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; // the full text<br>&nbsp; QP.DrawWrappedText(25.0, 15.0+hb, 160, s);<br>&nbsp; QP.DrawBox(25.0, 15.0, 160.0, sizey, 0);&nbsp; // show the needed space as box<br></font><br>I hope it helps,<br><br>Werner<br><br><br>]]>
   </description>
   <pubDate>Thu, 13 Oct 2011 16:27:30 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/vertical-position-after-drawmultilinetext_topic1754_post8491.html#8491</guid>
  </item> 
  <item>
   <title><![CDATA[Vertical position after DrawMultiLineText :   I am trying toaccomplishthe...]]></title>
   <link>http://www.quickpdf.org/forum/vertical-position-after-drawmultilinetext_topic1754_post7648.html#7648</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1549">FernandoV</a><br /><strong>Subject:</strong> 1754<br /><strong>Posted:</strong> 02 Mar 11 at 4:39PM<br /><br /><DIV></DIV><FONT size=2><DIV>&nbsp;</DIV><DIV>I am trying to&nbsp;accomplishthe following:</DIV><DIV>&nbsp;</DIV><DIV>1.- Placing multilines text in a page. The number of lines is dynamic but&nbsp;for this sample i am using 100 lines.</DIV><DIV>2.- Place an image just below the last line of text</DIV><DIV>3.- Add pages automatically as needed to fit the text and image.</DIV><DIV>&nbsp;</DIV><DIV>Please advise</DIV><DIV>&nbsp;</DIV><DIV>Thank You</DIV><DIV>&nbsp;</DIV><DIV>This is what i have so far:</DIV><DIV>&nbsp;</DIV><DIV>************ Sample VB.Net **************</DIV><DIV>Private Sub Test()</DIV><DIV>&nbsp;</DIV><DIV>Dim qp as New QuickPDFAX????/PDFLibrary</DIV><DIV>Dim iID as Integer = 0</DIV><DIV>dim&nbsp;i as Integer = 0</DIV><DIV>dim sLine as String = String.Empty</DIV><DIV>&nbsp;</DIV><DIV>'This block will just fake multi lines tobe added to the page</DIV><DIV>For &nbsp;i = 0 to 100</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sLine += sLine&nbsp;+ "Line " + i.ToString + ControlChars.CrLf</DIV><DIV>Next i</DIV><DIV>&nbsp;</DIV><DIV>qp.SetOrigin(1)<BR>qp.AddStandardFont(8)<BR>qp.SetTextSize(7)<BR>qp.DrawMultiLineText(100, 10, ControlChars.CrLf, sText)</DIV><DIV>&nbsp;</DIV><DIV>'Now i need to add an image below the text<BR>qp.CompressImages(1)<BR>iID = qp.AddImageFromFile("c\test.jpg", 0)<BR>qp.SelectImage(iID)</DIV><DIV>&nbsp;</DIV><DIV>Dm YY as Double =&nbsp;????&nbsp;&nbsp;&nbsp; 'current Vertical Position,&nbsp; what is the vertical postion?</DIV><DIV><BR>qp.DrawscaleImage(200, YY, 0.5)<BR>qp.SaveToFile("c:\test.pdf") </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>End Sub<BR></DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2></FONT></FONT>]]>
   </description>
   <pubDate>Wed, 02 Mar 2011 16:39:05 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/vertical-position-after-drawmultilinetext_topic1754_post7648.html#7648</guid>
  </item> 
 </channel>
</rss>