<?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 : Formfield-Font</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 : Formfield-Font]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 17:39:08 +0000</pubDate>
  <lastBuildDate>Wed, 20 Apr 2016 19:41:45 +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=3312</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[Formfield-Font : Hi Josef,why you don&amp;#039;t want...]]></title>
   <link>http://www.quickpdf.org/forum/formfieldfont_topic3312_post13190.html#13190</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3312<br /><strong>Posted:</strong> 20 Apr 16 at 7:41PM<br /><br />Hi Josef,<div><br></div><div>why you don't want to read the sample on page 32 of the developer guide?!</div><div>http://www.debenu.com/docs/pdf_library_developer_guide/debenu_quick_pdf_library_10_developer_guide.pdf</div><div><br></div>]]>
   </description>
   <pubDate>Wed, 20 Apr 2016 19:41:45 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/formfieldfont_topic3312_post13190.html#13190</guid>
  </item> 
  <item>
   <title><![CDATA[Formfield-Font : Hi Josef,standard are the 14 (or...]]></title>
   <link>http://www.quickpdf.org/forum/formfieldfont_topic3312_post13189.html#13189</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3312<br /><strong>Posted:</strong> 20 Apr 16 at 7:23PM<br /><br />Hi Josef,<div><br></div><div>standard are the 14 (or so...) fonts inside the library.</div><div><br></div>]]>
   </description>
   <pubDate>Wed, 20 Apr 2016 19:23:58 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/formfieldfont_topic3312_post13189.html#13189</guid>
  </item> 
  <item>
   <title><![CDATA[Formfield-Font : Hi, you write &amp;#034;Arial&amp;#034;...]]></title>
   <link>http://www.quickpdf.org/forum/formfieldfont_topic3312_post13188.html#13188</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2850">Josef Gschwendtner</a><br /><strong>Subject:</strong> 3312<br /><strong>Posted:</strong> 20 Apr 16 at 4:29PM<br /><br />Hi, <br><br>you write "Arial" is not the standard.<br><br>So what would be the standard?<br><br>Thank you,<br>Josef<br>]]>
   </description>
   <pubDate>Wed, 20 Apr 2016 16:29:21 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/formfieldfont_topic3312_post13188.html#13188</guid>
  </item> 
  <item>
   <title><![CDATA[Formfield-Font : Hi,could anybody please write...]]></title>
   <link>http://www.quickpdf.org/forum/formfieldfont_topic3312_post13187.html#13187</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2850">Josef Gschwendtner</a><br /><strong>Subject:</strong> 3312<br /><strong>Posted:</strong> 20 Apr 16 at 4:21PM<br /><br />Hi,<br><br>could anybody <b>please </b>write down 10 lines of real code how to insert two formfields:<br>First field with font "Arial", second field with "Arial Bold"<br><br>We are only interested on the code needed for setting the font.<br><br>Your help is very appreciated.<br><br>Josef Gschwendtner<br>]]>
   </description>
   <pubDate>Wed, 20 Apr 2016 16:21:04 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/formfieldfont_topic3312_post13187.html#13187</guid>
  </item> 
  <item>
   <title><![CDATA[Formfield-Font : Hi,&amp;#034;... 20, 28, 50, 5.5,...]]></title>
   <link>http://www.quickpdf.org/forum/formfieldfont_topic3312_post13183.html#13183</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3312<br /><strong>Posted:</strong> 19 Apr 16 at 6:56PM<br /><br />Hi,<div><br></div><div><div>"... 20, 28, 50, 5.5, 'Arial', 10, clBlack, &#091;fsBold&#093;); ..."</div><div>if you write code like the line above, you're using the font "Arial" - nothing more.</div><div>Arial is not the standard - so you have to add this font.</div><div>If you need - for example - the bold Arial font you have to add the font-file "C:\Windows\Fonts\arialbd.ttf".</div><div>The real font name is "Arial Bold".</div><div>First you should try to add the font with the correct name...</div><div>then you should select it to make it active...</div><div>and then you can use it.</div><div>If you don't know the real font names you should call (in windows):</div><div>System control -&gt; All System control elements -&gt; Fonts</div><div>On the font file you can choose the properties and the details and there you can see the correct font name.</div></div><div><br></div>]]>
   </description>
   <pubDate>Tue, 19 Apr 2016 18:56:15 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/formfieldfont_topic3312_post13183.html#13183</guid>
  </item> 
  <item>
   <title><![CDATA[Formfield-Font : Hi,below I inserted some code,...]]></title>
   <link>http://www.quickpdf.org/forum/formfieldfont_topic3312_post13181.html#13181</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2850">Josef Gschwendtner</a><br /><strong>Subject:</strong> 3312<br /><strong>Posted:</strong> 19 Apr 16 at 4:01PM<br /><br /><font face="Courier New, Courier, mono">Hi,<br>below I inserted some code, showing how we create <b>formfields</b>.<br>Everything works except the <b>font-setting</b> does not work correct.<br>Some field have the correct font, some have not.<br><br>It would be great if somebody would look over the code (the bold sections) and maybe tell us how to make it better<img src="http://www.quickpdf.org/forum/smileys/smiley1.gif" border="0" alt="Smile" title="Smile" /><br><br>Thank you very much,<br>Josef Gschwendtner<br><br><br>procedure TfmMain.GeneratePDFDocument;<br>var<br>&nbsp; PDF: TDebenuPDFLibrary;<br>begin<br>&nbsp; PDF := TDebenuPDFLibrary.Create;<br>&nbsp; UnlockResult := PDF.UnlockKey(cDebenuLicenseKey);<br>&nbsp; try<br>&nbsp;&nbsp;&nbsp; if (UnlockResult = 1) then begin<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDF.LoadFromFile('C:\Temp\Template.pdf', '');<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set the paper size<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDF.SetPageSize('A4');<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set the origin to the top-left corner<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDF.SetOrigin(1);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set the measurement units to millimetres<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDF.SetMeasurementUnits(1);<br><br><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddPDFFormField(PDF, 'Field1', 'Field 1', 1, qrffctTextbox,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20, 28, 50, 5.5, 'Arial', 10, clBlack, &#091;fsBold&#093;);<br></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddPDFFormField(PDF, 'Field2', 'Field 2', 1, qrffctTextbox,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20, 48, 50, 5.5, 'Arial', 10, clBlack, &#091;fsBold&#093;);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Compress the contents of the file<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDF.CompressContent;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PDF.SaveToFile('C:\Temp\Test.pdf');<br>&nbsp;&nbsp;&nbsp; end;<br><br>&nbsp; finally<br>&nbsp;&nbsp;&nbsp; PDF.Free;<br>&nbsp; end;<br>end;<br><br><b>procedure TfmMain.AddPDFFormField(APDF: TDebenuPDFLibrary;<br></b>&nbsp; AName, AValue: String; APageNumber: Integer; AControlType: TQrffControlType;<br>&nbsp; ALeft, ATop, AWidth, AHeight: Double; AFontName: String; AFontSize: Integer;<br>&nbsp; AFontColor: TColor; AFontStyle: TFontStyles; AAlign: TQrsAlign;<br>&nbsp; AFlatten, AReadOnly, AMultiLine, ATransparent, AShowBorder: Boolean;<br>&nbsp; ABackgroundColor, ABorderColor: TColor; InTestMode: Boolean);<br>var<br>&nbsp; vFieldIndex, vFontID, vFormFontID, vAlign: Integer;<br>&nbsp; vColor: TRGBTriple;<br>begin<br>&nbsp; if (Trim(AFontName) = '') then<br>&nbsp;&nbsp;&nbsp; AFontName := 'Arial';<br><br><b>&nbsp; if (fsBold in AFontStyle) and (fsItalic in AFontStyle) then<br>&nbsp;&nbsp;&nbsp; AFontName := AFontName + ' &#091;BoldItalic&#093;'<br>&nbsp; else if (fsBold in AFontStyle) then<br>&nbsp;&nbsp;&nbsp; AFontName := AFontName + ' &#091;Bold&#093;'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp; else if (fsItalic in AFontStyle) then<br>&nbsp;&nbsp;&nbsp; AFontName := AFontName + ' &#091;Italic&#093;';<br><br>&nbsp; vFontID := APDF.AddTrueTypeFont(AFontName, 0);<br>&nbsp; vFormFontID := APDF.AddFormFont(vFontID);<br></b><br>&nbsp; if (AControlType = qrffctCheckbox) then<br>&nbsp;&nbsp;&nbsp; vFieldIndex := APDF.NewFormField(AName, 3)<br>&nbsp; else<br>&nbsp;&nbsp;&nbsp; vFieldIndex := APDF.NewFormField(AName, 1);<br><br>&nbsp; // Position<br>&nbsp; APDF.SetFormFieldBounds(vFieldIndex, ALeft, ATop, AWidth, AHeight);<br><br>&nbsp; APDF.SetFormFieldPage(vFieldIndex, APageNumber); // Pagenumber<br><br><b>&nbsp; APDF.SetFormFieldFont(vFieldIndex, vFormFontID); // Font<br></b><br>&nbsp; APDF.SetFormFieldTextSize(vFieldIndex, AFontSize);&nbsp; // FontSize<br><br>&nbsp; vColor := RGBValue(AFontColor);<br>&nbsp; APDF.SetFormFieldColor(vFieldIndex, (vColor.rgbtRed/255), (vColor.rgbtGreen/255), (vColor.rgbtBlue/255)); // FontColor<br><br>&nbsp; // Alignment ( 0 = Left, 1 = Center, 2 = Right)<br>&nbsp; vAlign := 0;<br>&nbsp; case AAlign of<br>&nbsp;&nbsp;&nbsp; qaLeftJustify&nbsp; : vAlign := 0;<br>&nbsp;&nbsp;&nbsp; qaCentered&nbsp;&nbsp;&nbsp;&nbsp; : vAlign := 1;<br>&nbsp;&nbsp;&nbsp; qaRightJustify : vAlign := 2;<br>&nbsp; end;<br>&nbsp; APDF.SetFormFieldAlignment(vFieldIndex, vAlign);<br><br><br>&nbsp; if InTestMode then begin<br>&nbsp;&nbsp;&nbsp; vColor := RGBValue(clSilver);<br>&nbsp;&nbsp;&nbsp; APDF.SetFormFieldBackgroundColor(vFieldIndex, (vColor.rgbtRed/255), (vColor.rgbtGreen/255), (vColor.rgbtBlue/255));<br>&nbsp;&nbsp;&nbsp; APDF.SetFormFieldBorderColor(vFieldIndex, (vColor.rgbtRed/255), (vColor.rgbtGreen/255), (vColor.rgbtBlue/255));<br>&nbsp;&nbsp;&nbsp; APDF.SetFormFieldBorderStyle(vFieldIndex, 1, 0, 0, 0);<br>&nbsp; end<br>&nbsp; else begin<br>&nbsp;&nbsp;&nbsp; vColor := RGBValue(ABackgroundColor);<br>&nbsp;&nbsp;&nbsp; APDF.SetFormFieldBackgroundColor(vFieldIndex, (vColor.rgbtRed/255), (vColor.rgbtGreen/255), (vColor.rgbtBlue/255));<br><br>&nbsp;&nbsp;&nbsp; if AShowBorder then begin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vColor := RGBValue(ABorderColor);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APDF.SetFormFieldBorderColor(vFieldIndex, (vColor.rgbtRed/255), (vColor.rgbtGreen/255), (vColor.rgbtBlue/255));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APDF.SetFormFieldBorderStyle(vFieldIndex, 1, 0, 0, 0);<br>&nbsp;&nbsp;&nbsp; end;<br>&nbsp; end;<br><br>&nbsp; if (AControlType = qrffctTextbox) and AMultiLine then<br>&nbsp;&nbsp;&nbsp; APDF.SetFormFieldTextFlags(vFieldIndex, 1, 0, 0, 0, 0);<br><br>&nbsp; if (AControlType = qrffctCheckbox) then begin<br>&nbsp;&nbsp;&nbsp; APDF.SetFormFieldCheckStyle(vFieldIndex, 1, 1); // Style = Check, Centred<br>&nbsp;&nbsp;&nbsp; if AnsiSameText(AValue, 'T') then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APDF.SetFormFieldValue(vFieldIndex, 'Yes')<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APDF.SetFormFieldValue(vFieldIndex, 'No');<br>&nbsp; end<br>&nbsp; else<br>&nbsp;&nbsp;&nbsp; APDF.SetFormFieldValue(vFieldIndex, AValue);<br><br>&nbsp; if AReadOnly then<br>&nbsp;&nbsp;&nbsp; APDF.SetFormFieldReadOnly(vFieldIndex, 1);<br><br>&nbsp; if AFlatten then<br>&nbsp;&nbsp;&nbsp; APDF.UpdateAndFlattenFormField(vFieldIndex);<br>end;<br><br></font>]]>
   </description>
   <pubDate>Tue, 19 Apr 2016 16:01:07 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/formfieldfont_topic3312_post13181.html#13181</guid>
  </item> 
 </channel>
</rss>