<?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 : Bug fix - If you have 18.11 source code.</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 : Bug fix - If you have 18.11 source code.]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 07 Mar 2026 08:39:45 +0000</pubDate>
  <lastBuildDate>Wed, 16 Apr 2025 22:43:22 +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=4048</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[Bug fix - If you have 18.11 source code. : unit DebenuPDFLibraryFontRasterizer...]]></title>
   <link>http://www.quickpdf.org/forum/bug-fix-if-you-have-1811-source-code_topic4048_post16392.html#16392</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=173">swb1</a><br /><strong>Subject:</strong> 4048<br /><strong>Posted:</strong> 16 Apr 25 at 10:43PM<br /><br />unit DebenuPDFLibraryFontRasterizer has a bug that can cause an infinite loop when rendering some PDFs<br><b>I DO NOT KNOW IF THIS IS THE EXTACT RIGHT THING TO DO!!</b>! However, it fixed a problem I was having with a very small number of documents, and I know it does nothing that would break the vast majority that were already working.&nbsp;<br><br>I have solved it in my library by adding an <b>else/break</b> condition in the function GetW2DictCount:<br><br><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; function GetW2DictCount: Integer;</font><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; begin</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; Result := 0;</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; Obj := Font.FindValueByKeyName('W2', True);</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; if (Obj is TPDFArray) and (TPDFArray(Obj).Count &gt; 1) then</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; begin</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; WArray := TPDFArray(Obj);</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; WX := 0;</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; while WX &lt; (WArray.Count - 1) do</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; begin</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; if WArray.Item&#091;WX&#093; is TPDFNumeric then</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; begin</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if WArray.Item&#091;WX + 1&#093; is TPDFNumeric then</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WX := WX + 5;</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Inc(Result);</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if WArray.Item&#091;WX + 1&#093; is TPDFArray then</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Inc(Result, TPDFArray(WArray.Item&#091;WX + 1&#093;).Count);</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Inc(WX, 2);</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end</font></div><div><font face="Courier New, Courier, mono" color="#009900"><b style="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // -------------------</b></font></div><div><font face="Courier New, Courier, mono" color="#009900"><b style="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // swb 4-16-2025 if WX is never inc'd it will loop infinitely.</b></font></div><div><font face="Courier New, Courier, mono" color="#0066ff"><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</b></font></div><div><font face="Courier New, Courier, mono" color="#0066ff"><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</b></font></div><div><font face="Courier New, Courier, mono" color="#0066ff"><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</b></font></div><div><font face="Courier New, Courier, mono" color="#0066ff"><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;</b></font></div><div><font face="Courier New, Courier, mono"><b style=""><font color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font color="#009900"> // -------------------</font></b></font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; end</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; else if WArray.Item&#091;WX + 1&#093; is TPDFArray then</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; begin</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Inc(Result, TPDFArray(WArray.Item&#091;WX + 1&#093;).Count div 3);</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Inc(WX, 2);</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; &nbsp; end;</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; &nbsp; end;</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; &nbsp; end;</font></div><div><font face="Courier New, Courier, mono" color="#0066ff">&nbsp; end;</font></div>]]>
   </description>
   <pubDate>Wed, 16 Apr 2025 22:43:22 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/bug-fix-if-you-have-1811-source-code_topic4048_post16392.html#16392</guid>
  </item> 
 </channel>
</rss>