<?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 : FindFormFieldByTitle</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 : General Discussion : FindFormFieldByTitle]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 12:15:02 +0000</pubDate>
  <lastBuildDate>Sat, 15 Mar 2008 19:48:34 +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=879</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[FindFormFieldByTitle : Argh no, I&amp;#039;m an idiot! Please...]]></title>
   <link>http://www.quickpdf.org/forum/findformfieldbytitle_topic879_post4194.html#4194</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=210">jwhitham</a><br /><strong>Subject:</strong> 879<br /><strong>Posted:</strong> 15 Mar 08 at 7:48PM<br /><br />Argh no, I'm an idiot! Please ignore the above. Once flattened the field is of course no longer a field. Should have gone from count down to 1. <span style="font-size:10px"><br /><br />Edited by jwhitham - 15 Mar 08 at 7:49PM</span>]]>
   </description>
   <pubDate>Sat, 15 Mar 2008 19:48:34 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/findformfieldbytitle_topic879_post4194.html#4194</guid>
  </item> 
  <item>
   <title><![CDATA[FindFormFieldByTitle : Hi all,  I&amp;#039;ve just come...]]></title>
   <link>http://www.quickpdf.org/forum/findformfieldbytitle_topic879_post4193.html#4193</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=210">jwhitham</a><br /><strong>Subject:</strong> 879<br /><strong>Posted:</strong> 15 Mar 08 at 7:20PM<br /><br />Hi all,<DIV>&nbsp;</DIV><DIV>I've just come across some odd behaviour when calling FindFormFieldByTitle() using Delphi7/qpdf 5.11. I'm at home at the mo where I still have the dcu version, so I wont be able to look at the source till I'm at work tomorrow (Sunday <img src="http://www.quickpdf.org/forum/smileys/smiley18.gif" height="17" width="17" border="0" align="absmiddle" alt="Ouch" />).</DIV><DIV>&nbsp;</DIV><DIV>From what I can make out this function does not return 'The index of the form field with the specified title' as stated in the documentation, but 1 for success and 0 for failure. It does however seem to select the field in question, either that or calling it changes the index of the field searched for to 1.</DIV><DIV>&nbsp;</DIV><DIV>Follows Delphi code to test this:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>procedure TForm1.Button1Click(Sender: TObject);<BR>var<BR>&nbsp; qp: tisedquickpdf; f1, i: integer;<BR>begin<BR>&nbsp; qp := tisedquickpdf.Create;<BR>&nbsp; try<BR>&nbsp;&nbsp;&nbsp; screen.Cursor := crhourglass;<BR>&nbsp;&nbsp;&nbsp; qp.UnlockKey(iPDF_ID);<BR>&nbsp;&nbsp;&nbsp; qp.SetPageSize('A4');<BR>&nbsp;&nbsp;&nbsp; qp.SetMeasurementUnits(1);<BR>&nbsp;&nbsp;&nbsp; qp.SetOrigin(1);<BR>&nbsp;&nbsp;&nbsp; f1 := qp.AddStandardFont(5);<BR>&nbsp;&nbsp;&nbsp; qp.SelectFont(f1);<BR>&nbsp;&nbsp;&nbsp; for i := 1 to 6 do begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.NewFormField('Field ' + inttostr(i),1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.SetFormFieldDescription(i,'Field ' + inttostr(i));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.SetFormFieldTextSize(i,16);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.SetFormFieldValue(i,'This is form field #' + inttostr(i));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.SetFormFieldBounds(i,22,20*i,180,12);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.SetFormFieldVisible(i,1);<BR>&nbsp;&nbsp;&nbsp; end;<BR>&nbsp;&nbsp;&nbsp; savedialog1.Filter := 'PDF|*.pdf';<BR>&nbsp;&nbsp;&nbsp; savedialog1.DefaultExt := 'pdf';<BR>&nbsp;&nbsp;&nbsp; savedialog1.FileName := '';<BR>&nbsp;&nbsp;&nbsp; if savedialog1.Execute then begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.SaveToFile(savedialog1.FileName);<BR>&nbsp;&nbsp;&nbsp; end;<BR>&nbsp; finally<BR>&nbsp;&nbsp;&nbsp; qp.Free;<BR>&nbsp;&nbsp;&nbsp; screen.Cursor := crdefault;<BR>&nbsp; end;<BR>end;</DIV><DIV>procedure TForm1.Button2Click(Sender: TObject);<BR>var<BR>&nbsp; qp: tisedquickpdf; i,fieldindex: integer; s: string;<BR>begin<BR>&nbsp; qp := tisedquickpdf.Create;<BR>&nbsp; try<BR>&nbsp;&nbsp;&nbsp; screen.Cursor := crhourglass;<BR>&nbsp;&nbsp;&nbsp; qp.UnlockKey(iPDF_ID);<BR>&nbsp;&nbsp;&nbsp; opendialog1.Filter := 'PDF|*.pdf';<BR>&nbsp;&nbsp;&nbsp; opendialog1.FileName := '';<BR>&nbsp;&nbsp;&nbsp; if opendialog1.Execute then begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.LoadFromFile(opendialog1.FileName);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for i := 1 to qp.FormFieldCount do begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s := 'Field ' + inttostr(i);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fieldindex := qp.FindFormFieldByTitle(s);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.SetFormFieldValue(fieldindex,'No longer a form field! ' + inttostr(i) + ' ' +<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inttostr(fieldindex) + ' ' + s);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.FlattenFormField(fieldindex);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qp.SaveToFile(opendialog1.FileName);<BR>&nbsp;&nbsp;&nbsp; end;<BR>&nbsp; finally<BR>&nbsp;&nbsp;&nbsp; qp.Free;<BR>&nbsp;&nbsp;&nbsp; screen.Cursor := crdefault;<BR>&nbsp; end;<BR>end;</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Create a PDF with button1 and view it, then flatten the fields with button2 and take a look at the values for 'fieldindex'.</DIV>]]>
   </description>
   <pubDate>Sat, 15 Mar 2008 19:20:40 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/findformfieldbytitle_topic879_post4193.html#4193</guid>
  </item> 
 </channel>
</rss>