<?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 : HTMLTextBox ending y calculation</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 : HTMLTextBox ending y calculation]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 18:40:39 +0000</pubDate>
  <lastBuildDate>Thu, 19 May 2011 22:12:28 +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=1760</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[HTMLTextBox ending y calculation :   I was right, I was definitely...]]></title>
   <link>http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7917.html#7917</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1556">rdmstrs</a><br /><strong>Subject:</strong> 1760<br /><strong>Posted:</strong> 19 May 11 at 10:12PM<br /><br />I was right, I was definitely making this more difficult than necessary. Just wanted to post what finally worked. getHTMLTextHeight does give you the correct amount of space taken and you simply subtract it from the top of your HTMLTextbox and there is your y value. I wasn't passing the correct html to the function when I tried testing it previously.]]>
   </description>
   <pubDate>Thu, 19 May 2011 22:12:28 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7917.html#7917</guid>
  </item> 
  <item>
   <title><![CDATA[HTMLTextBox ending y calculation : Here is the code, thanks for any...]]></title>
   <link>http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7682.html#7682</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1556">rdmstrs</a><br /><strong>Subject:</strong> 1760<br /><strong>Posted:</strong> 09 Mar 11 at 5:09PM<br /><br /><P>Here is the code, thanks for any help.</P><DIV>&nbsp;&nbsp;&nbsp; Public Sub CreateDoc()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim PDFLibrary As QuickPDFAX0723.PDFLibrary<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary = CType(CreateObject("QuickPDFAX0723.PDFLibrary"), QuickPDFAX0723.PDFLibrary)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If PDFLibrary.UnlockKey("Unlock Key") = 1 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary.AddImageFromFile(Application.StartupPath &amp; "\Images\1.jpg", 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary = WriteHeader(PDFLibrary)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Content As String = PDFLibrary.DrawHTMLTextBox(40, 635, 540, 570, Text(PDFLibrary))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim LastPgContent As String = Content<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim hTBWidth As Double = PDFLibrary.GetHTMLTextWidth(540, Text(PDFLibrary))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim hTBLineCount As Long = PDFLibrary.GetHTMLTextLineCount(hTBWidth, Text(PDFLibrary))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim TextHeight As Double = PDFLibrary.GetHTMLTextHeight(540, Text(PDFLibrary))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim MultiPg As Boolean = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary = WriteFooter(PDFLibrary)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do Until Content = ""<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary.NewPage()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary = WriteHeader(PDFLibrary)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If PDFLibrary.GetHTMLTextLineCount(540, Content) &lt; 49 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LastPgContent = Content<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Content = PDFLibrary.DrawHTMLTextBox(40, 635, 540, 570, Content)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary = WriteFooter(PDFLibrary)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MultiPg = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Loop<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If MultiPg Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hTBWidth = PDFLibrary.GetHTMLTextWidth(540, LastPgContent)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hTBLineCount = PDFLibrary.GetHTMLTextLineCount(hTBWidth, LastPgContent)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TextHeight = PDFLibrary.GetHTMLTextHeight(540, LastPgContent)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim y As Double = 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y = hTBLineCount * (TextHeight / hTBLineCount)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary = WriteSig(PDFLibrary, y, 40)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 1 To PDFLibrary.PageCount<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary.SelectPage(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary.DrawHTMLText(480, 775, 250, "&lt;font size=""3""&gt;&lt;b&gt;Page " &amp; i &amp; " of " &amp; PDFLibrary.PageCount &amp; "&lt;/b&gt;&lt;/font&gt;")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next<BR>#If DEBUG Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary.SaveToFile("C:\Docs\Doc.pdf")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Dim PrintOp As Integer = PDFLibrary.PrintOptions(0, 0, "Doc")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PDFLibrary.PrintDocument("myPrinter", 1, PDFLibrary.PageCount, PrintOp)<BR>#Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Send file to server<BR>#End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDFLibrary = Nothing<BR>&nbsp;&nbsp;&nbsp; End Sub<BR>&nbsp;&nbsp;&nbsp; Function Text(ByVal myPdfLib As QuickPDFAX0723.PDFLibrary) As String<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim sText As String = "Some Strings"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return sText<BR>&nbsp;&nbsp;&nbsp; End Function<BR>&nbsp;&nbsp;&nbsp; Private Function WriteSig(ByVal oPDF As QuickPDFAX0723.PDFLibrary, ByVal y As Double, Optional ByVal left As Integer = 210) As QuickPDFAX0723.PDFLibrary<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Last As String = "Last"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Last = "LastName" Or Last = "Other Lastname" Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.AddImageFromFile(Application.StartupPath &amp; "\Images\Sig.jpg", 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.DrawImage(left, (725 - y), 150, 45)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Sig As String = ""<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sig = "Name&lt;br&gt;Title"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.DrawHTMLTextBox(left, (725 - y) - 50, 375, 75, Sig)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return oPDF<BR>&nbsp;&nbsp;&nbsp; End Function<BR>&nbsp;&nbsp;&nbsp; Private Function WriteHeader(ByVal oPDF As QuickPDFAX0723.PDFLibrary) As QuickPDFAX0723.PDFLibrary<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.DrawImage(450, 750, 126, 94)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.DrawLine(32, 760, 580, 760)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.DrawLine(32, 645, 580, 645)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.DrawHTMLText(480, 640, 250, "&lt;font size=""6""&gt;&lt;b&gt;Title&lt;/b&gt;&lt;/font&gt;")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return oPDF<BR>&nbsp;&nbsp;&nbsp; End Function<BR>&nbsp;&nbsp;&nbsp; Private Function WriteFooter(ByVal oPDF As QuickPDFAX0723.PDFLibrary) As QuickPDFAX0723.PDFLibrary<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.DrawLine(32, 45, 580, 45)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim sFooter As String = "Address"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPDF.DrawHTMLText(32, 35, 548, "&lt;p align=""center""&gt;" &amp; sFooter &amp; "&lt;/Align&gt;")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return oPDF<BR>&nbsp;&nbsp;&nbsp; End Function<BR></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 09 Mar 2011 17:09:54 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7682.html#7682</guid>
  </item> 
  <item>
   <title><![CDATA[HTMLTextBox ending y calculation : Can you post the code that you&amp;#039;ve...]]></title>
   <link>http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7668.html#7668</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1000">Rowan</a><br /><strong>Subject:</strong> 1760<br /><strong>Posted:</strong> 08 Mar 11 at 10:21AM<br /><br />Can you post the code that you've got so far? Perhaps we'll be able to provide some tips on how to improve it.]]>
   </description>
   <pubDate>Tue, 08 Mar 2011 10:21:45 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7668.html#7668</guid>
  </item> 
  <item>
   <title><![CDATA[HTMLTextBox ending y calculation : That didn&amp;#039;t do the trick...]]></title>
   <link>http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7667.html#7667</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1556">rdmstrs</a><br /><strong>Subject:</strong> 1760<br /><strong>Posted:</strong> 07 Mar 11 at 10:46PM<br /><br />That didn't do the trick either.]]>
   </description>
   <pubDate>Mon, 07 Mar 2011 22:46:47 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7667.html#7667</guid>
  </item> 
  <item>
   <title><![CDATA[HTMLTextBox ending y calculation : I went back to the documentation...]]></title>
   <link>http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7666.html#7666</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1556">rdmstrs</a><br /><strong>Subject:</strong> 1760<br /><strong>Posted:</strong> 07 Mar 11 at 10:37PM<br /><br />I went back to the documentation after posting this just to make sure I didn't miss a function that returns text height and there it was. I will try it again using that.]]>
   </description>
   <pubDate>Mon, 07 Mar 2011 22:37:38 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7666.html#7666</guid>
  </item> 
  <item>
   <title><![CDATA[HTMLTextBox ending y calculation : I am sure this is easier than...]]></title>
   <link>http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7665.html#7665</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1556">rdmstrs</a><br /><strong>Subject:</strong> 1760<br /><strong>Posted:</strong> 07 Mar 11 at 10:33PM<br /><br />I am sure this is easier than I am making it. I am dynamically making an HTMLTextBox that can be on 1 page or infinite pages everything for that is working great, however I need to add some text and an image after the last box. I am having the toughest time calculating the y pos at the end of the box. I am using the line count and then multiplying that by my best guess at font height, however it is very inconsistent. Any ideas? I am working in vb.net with the activeX]]>
   </description>
   <pubDate>Mon, 07 Mar 2011 22:33:29 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/htmltextbox-ending-y-calculation_topic1760_post7665.html#7665</guid>
  </item> 
 </channel>
</rss>