<?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 : Exporting FormField Fonts</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 : Exporting FormField Fonts]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 27 May 2026 17:08:12 +0000</pubDate>
  <lastBuildDate>Wed, 19 Nov 2014 11:10:06 +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=3001</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[Exporting FormField Fonts : Conner,First off I would suggest...]]></title>
   <link>http://www.quickpdf.org/forum/exporting-formfield-fonts_topic3001_post12139.html#12139</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 3001<br /><strong>Posted:</strong> 19 Nov 14 at 11:10AM<br /><br />Conner,<div><br></div><div>First off I would suggest not using CodePages but instead set all strings as Unicode encoding.</div><div><br></div><div>Existing fonts in a PDF file may often only contain a subset of the characters of that font. &nbsp;</div><div><br></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;">re : SetFormFieldStandardFont(4)</span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;"><br></span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;">This is a built in PDF font that that is supported by default by all PDF renderers / viewers. &nbsp;Unfortunately there are only 229 or so charaters in this font so most Unicode characters are not included in the font.</span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;"><br></span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;">re : Arabic - &nbsp;We have very limited support for Arabic in the current versions of Debenu Quick PDF Library.</span></div><div><br></div><div>re :&nbsp;<span style="line-height: 16.7999992370605px; : rgb251, 251, 253;">FQPDF.AddTrueTypeFont('Garbage-string' ,1);</span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;"><br></span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;">A PDF library always needs to return the closest matching font to the font requested so that at least some characters are drawn.</span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;"><br></span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;">In Debenu Quick PDF library 11.12 can you try using something like the following</span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;"><br></span></div><div><span style=": rgb251, 251, 253;"><div><br></div><div><span style="line-height: 1.4;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Arial Unicode MS contains most characters</span></div><div><span style="line-height: 1.4;">&nbsp; &nbsp; &nbsp;&nbsp;</span></div></span><div style="line-height: 16.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Create a dynamically subsetted font with Option 4.&nbsp;</div><span style=": rgb251, 251, 253;"><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int fid1 = QP.AddTrueTypeSubsettedFont("Arial Unicode MS", "", 4);</div><div><span style="line-height: 1.4;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QP.SelectFont(fid1);</span></div><div><span style="line-height: 1.4;"><br></span></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int ffid1 = QP.AddFormFont(fid1);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // formfieldId must be a valid formfield ID. &nbsp;ie. &nbsp;between 1 and QP.FormFieldCount()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QP.SetFormFieldValue(formfieldId<span style="line-height: 16.7999992370605px;">, "</span><span style="line-height: 16.7999992370605px;">ФЫВАABCDEF123456")</span></div></span><span style=": rgb251, 251, 253;"><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Test drawing on the page.</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QP.SetOrigin(1);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QP.DrawText(50, 50, "ФЫВА &nbsp;ABCDEF123456");</div><div style="line-height: 16.7999992370605px;"><br></div></span></div><div><span style="line-height: 16.7999992370605px; : rgb251, 251, 253;">Andrew</span></div>]]>
   </description>
   <pubDate>Wed, 19 Nov 2014 11:10:06 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/exporting-formfield-fonts_topic3001_post12139.html#12139</guid>
  </item> 
  <item>
   <title><![CDATA[Exporting FormField Fonts : FQPDF.AddTrueTypeFont(&amp;#039;Garbage-string&amp;#039;...]]></title>
   <link>http://www.quickpdf.org/forum/exporting-formfield-fonts_topic3001_post12100.html#12100</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2649">connerdk</a><br /><strong>Subject:</strong> 3001<br /><strong>Posted:</strong> 07 Nov 14 at 1:48PM<br /><br />FQPDF.AddTrueTypeFont('Garbage-string' ,1);<br>returns non-zero value even though i dont have a font called <span style="line-height: 16.7999992370605px;">'Garbage-string'</span>]]>
   </description>
   <pubDate>Fri, 07 Nov 2014 13:48:08 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/exporting-formfield-fonts_topic3001_post12100.html#12100</guid>
  </item> 
  <item>
   <title><![CDATA[Exporting FormField Fonts : Hi, i am using Debenu QuickPDF...]]></title>
   <link>http://www.quickpdf.org/forum/exporting-formfield-fonts_topic3001_post12099.html#12099</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2649">connerdk</a><br /><strong>Subject:</strong> 3001<br /><strong>Posted:</strong> 07 Nov 14 at 10:52AM<br /><br />Hi, i am using Debenu QuickPDF Library v9.16, but have testet this with v11.12 and i still have same issue.<div><br></div><div>I have a PDF with text form fields and needs to fill text with string for a certain codepage e.g. codepage 1250 and insert letter Ł. I finally got it to render correct, but when saving it to a file all standard ascii letters are shown as dots when opened in adobe reader and only the speciel letters like&nbsp;Ł can be read.</div><div><br></div><div><span style="line-height: 1.4;">If i use&nbsp;GetInstalledFontsByCodePage function and just render with the first suggested font it actually works, but it is "arabic typesettings" font which is not very readable, when trying to use another more common font like "Helvetica" or "Arial" it does not work.</span></div><div><br></div><div>Also if i omit&nbsp;SetFormFieldFont and only use&nbsp;SetFormFieldStandardFont(4) // Helvetica on the form field, then it seems to write the file correct but then i can not display the speciel letters when rendering in QuickPDF.</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"><br><div>&nbsp; &nbsp; &nbsp; FQPDF.FindFonts; // Neccessary?</div><div><br></div><div>&nbsp; &nbsp; &nbsp; slFontNames := TStringList.Create;</div><div>&nbsp; &nbsp; &nbsp; slFontNames.CommaText := FQPDF.GetInstalledFontsByCodePage(FCodePage, 0);</div><div>&nbsp; &nbsp; &nbsp; if slFontNames.Count &gt; 0 then</div><div>&nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; iPreferredFontIndex := -1;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for i := 0 to slFontNames.Count - 1 do</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (slFontNames<em> = 'Helvetica') or</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(slFontNames<em> = 'MS Sans Serif') or</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(slFontNames<em> = 'Arial')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iPreferredFontIndex := i;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if iPreferredFontIndex &gt; -1 then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sFontName := slFontNames&#091;iPreferredFontIndex&#093; + ' {' + IntToStr(FCodePage) + '}'</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sFontName := slFontNames&#091;0&#093; + ' {' + IntToStr(FCodePage) + '}';</div><div>&nbsp; &nbsp; &nbsp; &nbsp; iFontID := FQPDF.AddTrueTypeFont(sFontName ,1);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; FQPDF.SelectFont(iFontId);</div><div>&nbsp; &nbsp; &nbsp; end</div><div>&nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; iFontID := FQPDF.AddStandardFont(integer(SF_Helvetica));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; FQPDF.SelectFont(iFontID);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; sFontName := FQPDF.FontName;</div><div>&nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; &nbsp; slFontNames.Free;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; bFound := false;</div><div>&nbsp; &nbsp; &nbsp; for i := 1 to FQPDF.GetFormFontCount do</div><div>&nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if sFontName = FQPDF.GetFormFontName(i) then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FFormFieldFontID := i;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bFound := true;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; &nbsp; end;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; if not bFound then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; FFormFieldFontID := FQPDF.AddFormFont(iFontID);<br><br>&nbsp; // Following is done for every field</div></div><div><div>&nbsp; &nbsp; &nbsp;FQPDF.SetFormFieldStandardFont(oFormField.Fields<em>.Id, integer(SF_Helvetica));&nbsp;</div><div>&nbsp; &nbsp; &nbsp;FQPDF.SetFormFieldFont(oFormField.Fields<em>.Id, FFormFieldFontID);</div></div><div></pre></td></tr></table></div><div><br>Best regards<br>Rune</div>]]>
   </description>
   <pubDate>Fri, 07 Nov 2014 10:52:22 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/exporting-formfield-fonts_topic3001_post12099.html#12099</guid>
  </item> 
 </channel>
</rss>