<?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 : HTML Drawing - more quirks</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 : HTML Drawing - more quirks]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 17:28:55 +0000</pubDate>
  <lastBuildDate>Sat, 24 Dec 2011 12:00:26 +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=2062</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[HTML Drawing - more quirks :   By the way - the previous...]]></title>
   <link>http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8859.html#8859</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2062<br /><strong>Posted:</strong> 24 Dec 11 at 12:00PM<br /><br />By the way - the previous code is just to see what actually compiles and executes.&nbsp; I doubt that I have any legal right to copy the ttf files and include them in a pdf.&nbsp; I don't think I would get in serious trouble, but browsing the internet shows a lot of people selling and giving away font files, so there are dollars involved.&nbsp; I think I will stick with the "standard" fonts and not have to worry about it.&nbsp; :=}]]>
   </description>
   <pubDate>Sat, 24 Dec 2011 12:00:26 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8859.html#8859</guid>
  </item> 
  <item>
   <title><![CDATA[HTML Drawing - more quirks :   Ok... I figured out something...]]></title>
   <link>http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8858.html#8858</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2062<br /><strong>Posted:</strong> 24 Dec 11 at 11:56AM<br /><br />Ok...&nbsp; I figured out something about font faces and DrawHTMLtext.&nbsp; I went over to /Windows/Fonts (in Windows 7 - Windows Explorer) and noticed that some of the fonts had stacked "file" icons to represent multiple files involved in the specific font face.&nbsp; Selecting one and "copy" and then "paste"ing it into my project folder got me a group of ttf files that pretty clearly related to regular, bold, italic and bolditalic.<div></div><div>&nbsp;</div><div>This code fragment set the four HTML modes correctly:</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp; fn := 'arial.ttf';&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fontid := QP.AddTrueTypeFontFromFile(fn); </div><div>&nbsp;&nbsp;&nbsp;&nbsp; if fontid &gt; 0 then QP.SetHTMLNormalFont('Default',fontid);<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp; fn := 'ariali.ttf';&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fontid := QP.AddTrueTypeFontFromFile(fn); </div><div>&nbsp;&nbsp;&nbsp;&nbsp; if fontid &gt; 0 then QP.SetHTMLItalicFont('Default',fontid);<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp; fn := 'arialbd.ttf';&nbsp;&nbsp;&nbsp; fontid := QP.AddTrueTypeFontFromFile(fn); </div><div>&nbsp;&nbsp;&nbsp;&nbsp; if fontid &gt; 0 then QP.SetHTMLBoldFont('Default',fontid);<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp; fn := 'arialbi.ttf';&nbsp;&nbsp;&nbsp;&nbsp; fontid := QP.AddTrueTypeFontFromFile(fn); </div><div>&nbsp;&nbsp;&nbsp;&nbsp; if fontid &gt; 0 then QP.SetHTMLBoldItalicFont('Default',fontid);</div><div>&nbsp;</div><div>In the process, I discovered that a trivial "Quick Brown Fox" DrawHTMLText pdf page went from 12kbytes to 2.6Mbytes - then looking at the 4 ttf files, I can see that these total up about the same.</div><div>&nbsp;</div><div>So, my conclusion is that it is reasonable to add in font files if needed, but that it is pretty expensive in file size to do so.</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Sat, 24 Dec 2011 11:56:27 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8858.html#8858</guid>
  </item> 
  <item>
   <title><![CDATA[HTML Drawing - more quirks :   This is WAY down on the quirk...]]></title>
   <link>http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8857.html#8857</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2062<br /><strong>Posted:</strong> 24 Dec 11 at 10:51AM<br /><br />This is WAY down on the quirk importance list.&nbsp; I figured out the logic of needing four separate calls to AddStandardFont and SetHTMLxxxFont to set up a specific typeface for HTML work - Courier/Helvetica/TimesRoman.&nbsp; There is a minor oddity in the standard font list variation order for italic and bold/italic for TimesRoman.&nbsp; I was taking a shortcut of using&nbsp; StandardFontIDs of 0, 4 and 8, and then adding 1 for bold, adding 2 for bolditalic and adding 3 for italic, but the last 2 are reversed for TimesRoman.&nbsp; Once I got rid of the shortcut, I was able to set HTML font faces correctly.<div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Sat, 24 Dec 2011 10:51:15 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8857.html#8857</guid>
  </item> 
  <item>
   <title><![CDATA[HTML Drawing - more quirks : Thanks for the valuable feedback.The...]]></title>
   <link>http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8792.html#8792</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2062<br /><strong>Posted:</strong> 08 Dec 11 at 12:56AM<br /><br /><div>Thanks for the valuable feedback.</div><div><br></div><div>The &lt;stack&gt; object is used to save the current drawing settings when jumping to a new page and is only used internally. &nbsp;I don't fully understand myself how well it works or doesn't work as I didn't write the code.</div><div><br></div><div>I will pass your comments on to our documentation expert.</div><div><br></div>It seems the nbsp; function is working fine. &nbsp;The issue was with&nbsp;QP.AddTrueTypeFont("Arial {1251})", 1);<div><br></div><div>As of 8.13 adding a TrueType font with a code page adds all the characters from this code page but converts these characters to their Unicode versions. &nbsp;So when you call DrawText you need to use a Unicode string and not a 1251 encoded string.</div>]]>
   </description>
   <pubDate>Thu, 08 Dec 2011 00:56:03 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8792.html#8792</guid>
  </item> 
  <item>
   <title><![CDATA[HTML Drawing - more quirks :   Hi Andrew - Thanks for looking...]]></title>
   <link>http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8791.html#8791</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2062<br /><strong>Posted:</strong> 06 Dec 11 at 1:35PM<br /><br />Hi Andrew - Thanks for looking into it.&nbsp; I have probably put in 25 hours or so exploring the HTML aspects of QPDF and I am not finding any serious defects - at most I call them quirks.&nbsp; A "quirk" has a straight-forward work-around.<div>&nbsp;</div><div>The one about the "&lt;stack... " return from DrawHTMLTextBox is probably an actual "bug", but I am not sure this return would be practical to use even if it worked correctly, so ignoring it makes no difference to the work I'm doing.</div><div>&nbsp;</div><div>The exact subset of HTML tags that QPDF implements is a very useful one wehn viewed as a way to format a short string (like a table cell).&nbsp; The only small extensions I would suggest (small syntax impact, not necessarily small code impact) would be:</div><div>&nbsp;</div><div>1. "&lt;font size="+1"&gt; - type relative size changes.&nbsp; I'll bet this one would be easy.&nbsp; I will probably work-around with a little string manipulation.</div><div>&nbsp;</div><div>2. The documentation should mention that "&lt;/font&gt;"&nbsp;is implemented and&nbsp;cancels the changes you previously made, but that a second "&lt;font" tag specifying some other aspect leaves in the previous changes in place.</div><div>&nbsp;</div><div>3. I love writing "complaints".&nbsp; In trying to document the "bugs" I learn new things. I was going to complain about the need for "&lt;p align="Right"&gt;" and I discovered that it is actually there, just not in the documentation - just like "&lt;/font&gt;"</div><div>&nbsp;</div><div>These are actually the kind of complaints a coder likes to see - where the code is already there, but a few lines need to be added to the documentation.&nbsp; So, the net&nbsp;content of this post is&nbsp;a mild request for relative font size specification.</div><div>&nbsp;</div><div>Thanks for a great product - Howard&nbsp;&nbsp; </div>]]>
   </description>
   <pubDate>Tue, 06 Dec 2011 13:35:06 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8791.html#8791</guid>
  </item> 
  <item>
   <title><![CDATA[HTML Drawing - more quirks : Thanks for the feedback and reports....]]></title>
   <link>http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8789.html#8789</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2062<br /><strong>Posted:</strong> 06 Dec 11 at 5:31AM<br /><br />Thanks for the feedback and reports. &nbsp;I will look into the HTML when I get some free time. &nbsp;There is also a small issue with &amp;nbsp; &nbsp;that I am working on. &nbsp;<div><br></div><div>It is fairly complex code that I didn't write but I will see what I can do.</div><div><br></div><div>Andrew</div>]]>
   </description>
   <pubDate>Tue, 06 Dec 2011 05:31:15 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8789.html#8789</guid>
  </item> 
  <item>
   <title><![CDATA[HTML Drawing - more quirks :   HTML drawing is very powerful...]]></title>
   <link>http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8788.html#8788</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2062<br /><strong>Posted:</strong> 06 Dec 11 at 1:05AM<br /><br />HTML drawing is very powerful and works pretty well, but one thing has me baffled.&nbsp; I have figured out how (and more or less why) to use SetHTMLNormalFont and the others.&nbsp;&nbsp;The normal DrawText font has enough additional calls to control just about everything font-related - Fine.<div>&nbsp;</div><div>What I can't figure out is how to set the HTML font to some specific size for the default height - size 1 or size 4&nbsp; or whatever one could be considered the default.&nbsp; It seems like it would be quite reasonable and/or straight-forward to do this, but there may be internal resons why this is not an easy thing to do.</div><div>&nbsp;</div><div>A key reason why this would be useful is that effectively, each call to DrawHTMLText&nbsp;or the measure Height and Width calls all start from whatever that essential "default size" is, rather than what the current, or most recently used size is.&nbsp; I can understand the code logic for this, but it means that I have to essentially preface every string to be output with a "&lt;font ...&gt;" tag to continue on with whatever I consider my "current" size whenever I want to measure or draw a string.&nbsp; </div><div>&nbsp;</div><div>This is not amazingly difficult to do, but it seems a bit cumbersome.&nbsp; The reasoning may be that we are essentially dealing with 4 fonts sepaarately and it would just take tooo many calls to control all these things.</div><div>&nbsp;</div><div>I just thought I would toss this into the ring.&nbsp; Otherwise, I'm having great fun and making lots of progress with writing flexible table-equivalent output.</div>]]>
   </description>
   <pubDate>Tue, 06 Dec 2011 01:05:58 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8788.html#8788</guid>
  </item> 
  <item>
   <title><![CDATA[HTML Drawing - more quirks :   One would expect the following...]]></title>
   <link>http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8773.html#8773</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2062<br /><strong>Posted:</strong> 02 Dec 11 at 3:42PM<br /><br />One would expect the following to produce sensible output (single spaces between the formatted words Quick/Brown/Fox)&nbsp;<div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s := 'The &lt;b&gt;Quick&lt;/b&gt; &lt;i&gt;Brown&lt;/i&gt; &lt;u&gt;Fox&lt;/u&gt; is';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.DrawHTMLText(1.00,2.00,6.00,s);</div><div>&nbsp;</div><div>but it takes the following to do it:</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s := 'The &lt;b&gt;Quick &lt;/b&gt; &lt;i&gt;Brown &lt;/i&gt; &lt;u&gt;Fox&lt;/u&gt; is';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.DrawHTMLText(1.00,2.35,6.00,s);</div><div><br>&nbsp;</div><div>Internet Explorer handles the original string correctly.</div><div>&nbsp;</div><div>It would appear that a space is being treated as insignificant between two html tags.</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 02 Dec 2011 15:42:23 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/html-drawing-more-quirks_topic2062_post8773.html#8773</guid>
  </item> 
 </channel>
</rss>