Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - FormFieldCount Error
  FAQ FAQ  Forum Search   Register Register  Login Login

FormFieldCount Error

 Post Reply Post Reply
Author
Message
JohnTurpin View Drop Down
Beginner
Beginner
Avatar

Joined: 26 Apr 12
Location: USA
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnTurpin Quote  Post ReplyReply Direct Link To This Post Topic: FormFieldCount Error
    Posted: 26 Apr 12 at 4:11PM
I have a PDF with fields which I use as a template.
I use CopyPageRanges to copy it to a new document.
The problem is when I call FormFieldCount on the new doc it returns zero!...the original had 42 fields.

PdfLib.NewDocument();
int ChqsDocID = PdfLib.SelectedDocument();

int i = PdfLib.LoadFromFile(FN, "");
int TemplateDocID = PdfLib.SelectedDocument();
int FldCnt = PdfLib.FormFieldCount(); //42 fields in the template

PdfLib.SelectDocument(ChqsDocID);

i = 1;
while (i <= NumFormsIWant)
{
   PdfLib.CopyPageRanges(TemplateDocID, "1"); //This works
                                   
   int FldCnt2 = PdfLib.FormFieldCount(); //RETURNS ZERO!
                                   
   if (PdfLib.SetFormFieldValueByTitle("FldName", "SomeVal") == 0); //This always fails as it does not recognize the fields yet!

.........
}

Any help would be appreciated
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 12 at 12:18PM
Which version of QuickPDF Library are you using ?  DLL, ActiveX ?? 8.xx or 7.xx ?

You may need to send the document to the official support forums so that we can test it.  You can uses the following link to submit a new support cast.


Andrew.
Back to Top
JohnTurpin View Drop Down
Beginner
Beginner
Avatar

Joined: 26 Apr 12
Location: USA
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnTurpin Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 12 at 1:39PM
I am using version 8.13

I am using the dll (QuickPDFDLL0813.dll)

The problem seems to be that the changes are not committed to the PDF until a second operation is performed. For example:
PdfLib.CopyPageRanges(TemplateDocID, "1"); /* Let's call this "First Form". */
/*At this stage the fields on this first form are not available. */

PdfLib.CopyPageRanges(TemplateDocID, "1") ; //Second Form
/* Now the first copy is fully committed and I can access the fields on the First Form. */
....Note: I flatten the fields here...

PdfLib.CopyPageRanges(TemplateDocID, "1") ; //Second Form
/* Now the second copy is fully committed and I can access the fields on the Second Form. */

If there were a "flush" command to force the fields to commit that would solve the problem.

.......then at the end I just delete the extra form. (Note: After setting the fields on the first form I flatten the fields out so that there isn't a name conflict when I add set the fields on the second form.) Just as a matter of interest, is there a way of accessing the fields on each form like Page[1].Fields["FirstField"]  ....   Page[2].Fields["FirstField"]?



Back to Top
JohnTurpin View Drop Down
Beginner
Beginner
Avatar

Joined: 26 Apr 12
Location: USA
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnTurpin Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 12 at 1:40PM

Back to Top
JohnTurpin View Drop Down
Beginner
Beginner
Avatar

Joined: 26 Apr 12
Location: USA
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnTurpin Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 12 at 1:41PM
PS...I will post to the support link you provided.
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 10 May 12 at 12:59PM
John,

This bug should be fixed in the 8.16 Beta 1 release.  Thanks for reporting it.

Andrew.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store