<?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 : Set Form Field Value problems</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 : Set Form Field Value problems]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 18:57:19 +0000</pubDate>
  <lastBuildDate>Thu, 25 Feb 2010 15:28:53 +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=1349</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[Set Form Field Value problems : There&amp;#039;s no need for a workaround.Both...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6192.html#6192</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 25 Feb 10 at 3:28PM<br /><br />There's no need for a workaround.<br>Both functions will give you the same result. Sure.<br>Probably there's something mixed anywhere set.../get...<br><br>]]>
   </description>
   <pubDate>Thu, 25 Feb 2010 15:28:53 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6192.html#6192</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems : Hi Ingo,  i dont know if there...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6191.html#6191</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1255">Francesco_Halley</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 25 Feb 10 at 1:57PM<br /><br /><DIV>Hi Ingo, </DIV><DIV>i dont know if there are hidden fields. When i opened the file using DA access </DIV><DIV>DAGetFormFieldCount returned me back 48, now, using FormFieldCount, 96. </DIV><DIV>But i found a solution to my problem without using the field count:</DIV><DIV>&nbsp;</DIV><DIV>int new_file = QP.LoadFromFile("form_file.pdf");&nbsp;<BR>ifstream values_file;<BR>values_file.open("new_data_file.txt", ios::in);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;string line, field_name;<BR>while(getline(values_file,line))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;string fn = getFieldName_byFile(line);&nbsp;&nbsp;//read the name of the field to edit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;string fv = getFieldValue_byFile(line);&nbsp;&nbsp;//read the new field value from file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;QP.SetFormFieldValueByTitle(fn,fv);<BR>&nbsp;int id_field = QP.FindFormFieldByTitle(fn);<BR>&nbsp;if(id_field != 0)<BR>&nbsp;&nbsp;QP.FlattenFormField(id_field);</DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>Thank you</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 25 Feb 2010 13:57:39 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6191.html#6191</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems :  So the form-creation already...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6190.html#6190</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 25 Feb 10 at 1:05PM<br /><br />So the form-creation already went wrong 48 unvisible fields... 48 visible fields... something like that?<br><br>Cheers, Ingo<br><span style="font-size:10px"><br /><br />Edited by Ingo - 25 Feb 10 at 1:06PM</span>]]>
   </description>
   <pubDate>Thu, 25 Feb 2010 13:05:36 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6190.html#6190</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems : Sorry, i saw it was a my problem....]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6189.html#6189</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1255">Francesco_Halley</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 25 Feb 10 at 11:56AM<br /><br /><P>Sorry, i saw it was a my problem. But now the FormFieldCount() function gives me back twice value of the fields (96 instead of 48), and not all fields turn flattened. I'll put a new post when i'll able to solve the problem. </P><DIV></DIV><DIV></DIV>Francesco ]]>
   </description>
   <pubDate>Thu, 25 Feb 2010 11:56:02 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6189.html#6189</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems : Hi!You did the create first and...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6188.html#6188</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 25 Feb 10 at 11:50AM<br /><br />Hi!<br><br>You did the create first and then the unlock-function?<br>What's possible:<br>It's not a real form.<br>What's the returning value from "new_file"? "1"? If it's "0" then there's already the error.<br><br>Cheers, Ingo<br><br>]]>
   </description>
   <pubDate>Thu, 25 Feb 2010 11:50:03 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6188.html#6188</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems : Hi guys,  i tried this code:...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6187.html#6187</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1255">Francesco_Halley</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 25 Feb 10 at 11:04AM<br /><br /><P>Hi guys, </P><DIV>i tried this code: </DIV><DIV><FONT size=2>int new_file = QP.LoadFromFile("C:\\dir\\form_file.pdf"); <BR>int num_fields = QP.FormFieldCount(); </FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>but QP.FormFieldCount(); give me back value 0.</FONT></DIV><DIV><FONT size=2>What did i&nbsp;forget?</FONT></DIV><DIV><FONT size=2>Any post will be helpful for me. </FONT></DIV><DIV><FONT size=2>Thank you very much</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Francesco</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 25 Feb 2010 11:04:35 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6187.html#6187</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems : I have been doing something similar...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6186.html#6186</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1086">Jack</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 23 Feb 10 at 10:28PM<br /><br />I have been doing something similar for a while.&nbsp; My data comes from SQL queries.&nbsp; I don't use any DA functions.&nbsp; It works kind of cool.&nbsp; I don't know C++ very well, but from what I see of your code, it looks like it should work.]]>
   </description>
   <pubDate>Tue, 23 Feb 2010 22:28:22 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6186.html#6186</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems : Hi!I agree with Tom:I can&amp;#039;t...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6185.html#6185</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 23 Feb 10 at 7:22PM<br /><br />Hi!<br><br>I agree with Tom:<br>I can't understand why you're using the DA-functions?<br>The same functions without "DA" are available in the lib.<br><br>Cheers, Ingo<br>]]>
   </description>
   <pubDate>Tue, 23 Feb 2010 19:22:36 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6185.html#6185</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems : You can use the standard FormFieldCount...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6183.html#6183</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1140">Shotgun Tom</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 23 Feb 10 at 4:53PM<br /><br />You can use the standard FormFieldCount to get&nbsp;your&nbsp;field count.<DIV>&nbsp;</DIV><DIV><FONT size=4><FONT face="Arial, Helvetica, sans-serif">&nbsp;(<B>function </B></FONT><FONT face="Arial, Helvetica, sans-serif">TQuickPDF0717.FormFieldCount: Integer;) </FONT></FONT></DIV><DIV>&nbsp;</DIV><DIV>Tom</DIV>]]>
   </description>
   <pubDate>Tue, 23 Feb 2010 16:53:26 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6183.html#6183</guid>
  </item> 
  <item>
   <title><![CDATA[Set Form Field Value problems : Hi Ingo,  I wanna explain better...]]></title>
   <link>http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6182.html#6182</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1255">Francesco_Halley</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 23 Feb 10 at 2:08PM<br /><br /><P>Hi Ingo, </P><P>I wanna explain better my mistake. I need to merge some data (saved on a text file) with a pdf which contains text fields. If i use DA functions i can't use the SetFormFieldFunction, while if i use the standard instructions i can't use the the GetFromFieldCount. I need to know the number of fields because i want to flatten them at the end of the operations, and FlattenFormField method need the index of the field.&nbsp; </P><P>So i found this solution: i used the DAOpenFunction to open the pdf file. Once obtained the Field Count, i closed the direct link and i loaded the file using standard options. <BR>Then i filled the fields using a loop, flattening each one at the end. </P><DIV></DIV>This is my sample code: <DIV>&nbsp;</DIV><DIV>int file_handle = QP.DAOpenFile("file.pdf","");&nbsp;&nbsp;<BR>int num_fields = QP.DAGetFormFieldCount(file_handle);&nbsp;&nbsp;&nbsp;<BR>QP.DACloseFile(file_handle);</DIV><DIV>// ...</DIV><DIV>int new_file = QP.LoadFromFile("file.pdf");</DIV><DIV>// ...</DIV><DIV>for(i=0; i&lt;num_fields; i++)<BR>{<BR>&nbsp;field_name = QP.GetFormFieldTitle(i); <BR>&nbsp;if(field_name.compare("...")==0)<BR>&nbsp;{<BR>&nbsp;&nbsp;int app = QP.SetFormFieldValue(i,"new value");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;QP.FlattenFormField(i);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;}<BR>}</DIV><DIV>&nbsp;</DIV><DIV>thank you again Ingo</DIV><DIV>&nbsp;</DIV><DIV>Francesco</DIV>]]>
   </description>
   <pubDate>Tue, 23 Feb 2010 14:08:01 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/set-form-field-value-problems_topic1349_post6182.html#6182</guid>
  </item> 
 </channel>
</rss>