<?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 : DrawTextBoxMatrix</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 : DrawTextBoxMatrix]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 03:56:22 +0000</pubDate>
  <lastBuildDate>Thu, 01 Aug 2013 08:16:11 +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=2696</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[DrawTextBoxMatrix : Dennis,For the new DrawTextBoxMatrix...]]></title>
   <link>http://www.quickpdf.org/forum/drawtextboxmatrix_topic2696_post11057.html#11057</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1921">kevindebenu</a><br /><strong>Subject:</strong> 2696<br /><strong>Posted:</strong> 01 Aug 13 at 8:16AM<br /><br />Dennis,<div><br></div><div><span style="line-height: 1.4;">For the new DrawTextBoxMatrix and DrawCapturedPageMatrix functions we decided to keep the matrix entries compatible with the existing DrawImageMatrix function.</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;">With an image the graphic element is interpreted as a 1x1 unit and the matrix scales it to the size it needs to be.</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;">This is the reason DrawTextBoxMatrix includes the first two parameters for the width and height of the untransformed text. The textbox is effectively scaled down to a 1x1 unit that can be transformed to any size/rotation/scale.</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;">So a simple change to your example should give the result you're expecting:</span></div><div><span style="line-height: 1.4;"><br></span></div><div><pre ="BBcode" style="width: 1674.578125px; : rgb251, 251, 253;">result = xpdf.DrawTextBoxMatrix(200, 50, "TextBoxMatrix", 0, 200, m12, m21, 50, 320, 100)</pre></div><div><br></div><div>In this case your matrix only included a rotation so it was easy to change the m11 and m22 entries from 1 to the new width/height. For other matrices you'd need to take your original matrix and multiply it by &#091; width 0 0 height 0 0 &#093;</div><div><br></div><div>As a test you could try the DrawImageMatrix function (to place a background image onto the page) and then use DrawTextBoxMatrix with the same matrix and the textbox should appear scaled to the same bounds as the image.</div><div><br></div><div>Regards,</div><div>Kevin</div>]]>
   </description>
   <pubDate>Thu, 01 Aug 2013 08:16:11 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/drawtextboxmatrix_topic2696_post11057.html#11057</guid>
  </item> 
  <item>
   <title><![CDATA[DrawTextBoxMatrix : Hi,I just purchased the Quick...]]></title>
   <link>http://www.quickpdf.org/forum/drawtextboxmatrix_topic2696_post11055.html#11055</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2434">dghoskins</a><br /><strong>Subject:</strong> 2696<br /><strong>Posted:</strong> 30 Jul 13 at 3:55PM<br /><br />Hi,<br>I just purchased the Quick PDF library and am experimenting with it.&nbsp; Version 9.15 introduced the DrawTextBoxMatrix function.&nbsp; The following test program (VBA in MS Access) generates a pdf with the DrawText function and the DrawTextBox function producing visible results.&nbsp; The DrawTextBoxMatrix does not produce a visible result.&nbsp; The messagbox indicates that the DrawTextBoxMatrix returns a result of 1.&nbsp; Am I missing something?<br><br>Test Program:<br><table width="99%"><tr><td><pre class="BBcode"><br>Sub MatrixTest()<br><br>&nbsp;&nbsp;&nbsp; Dim folder, fname As String<br>&nbsp;&nbsp;&nbsp; folder = CurrentProject.path &amp; "\"<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; fname = "Matrix Test.pdf"<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim xpdf As DebenuPDFLibraryAX0915.PDFLibrary<br>&nbsp;&nbsp;&nbsp; Dim hfont, result As Long<br>&nbsp;&nbsp;&nbsp; Dim title As String<br>&nbsp;&nbsp;&nbsp; Dim tw, ang1, ang2, m12, m21 As Double<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Set xpdf = CreateObject("DebenuPDFLibraryAX0915.PDFLibrary")<br>&nbsp;&nbsp;&nbsp; If xpdf.UnlockKey("xxxxxxxxxxxxxxxxxxxxxxxxx") = 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; xpdf.SetOrigin (1)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; hfont = xpdf.AddStandardFont(4)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; title = "Matrix Test"<br>&nbsp;&nbsp;&nbsp; xpdf.SetTextSize (24)<br>&nbsp;&nbsp;&nbsp; tw = xpdf.GetTextWidth(title)<br>&nbsp;&nbsp;&nbsp; Call xpdf.DrawText((xpdf.PageWidth - tw) / 2, 35, title)<br>&nbsp;&nbsp;&nbsp; xpdf.SetTextSize (18)<br><br>&nbsp;&nbsp;&nbsp; ang1 = 10<br>&nbsp;&nbsp;&nbsp; ang2 = 20<br>&nbsp;&nbsp;&nbsp; m12 = Tan(D2R(ang1))<br>&nbsp;&nbsp;&nbsp; m21 = Tan(D2R(ang2))<br>&nbsp;&nbsp;&nbsp; result = xpdf.DrawTextBoxMatrix(200, 50, "TextBoxMatrix", 0, 1, m12, m21, 1, 320, 100)<br>&nbsp;&nbsp;&nbsp; Call xpdf.DrawTextBox(320, 300, 200, 50, "TextBox", 0)<br>&nbsp;&nbsp;&nbsp; MsgBox ("Result is " + Str$(result))<br>&nbsp;&nbsp;&nbsp; Call xpdf.SaveToFile(folder + fname)<br>&nbsp;&nbsp;&nbsp; Set xpdf = Nothing<br>&nbsp;&nbsp;&nbsp; <br>End Sub<br><br>Function D2R(ByVal deg As Double) As Double<br>&nbsp;&nbsp;&nbsp; D2R = deg / 57.29578<br>End Function<br><br>Function R2D(ByVal rad As Double) As Double<br>&nbsp;&nbsp;&nbsp; R2D = rad * 57.29578<br>End Function<br></pre></td></tr></table><br><br>Thanks,<br>Dennis<br>]]>
   </description>
   <pubDate>Tue, 30 Jul 2013 15:55:19 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/drawtextboxmatrix_topic2696_post11055.html#11055</guid>
  </item> 
 </channel>
</rss>