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!
![]() |
Form Filling Duplication Problem |
Post Reply
|
| Author | |
DAVe3283
Beginner
Joined: 04 Jun 10 Location: USA Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Topic: Form Filling Duplication ProblemPosted: 04 Jun 10 at 3:23AM |
|
I am having a major problem with the form filling abilities of QuickPDF. I have several PDF files with form fields, that I want to fill differently. However, when I fill a field once, every field with the same name will be filled with the same information, even in different files.
I created a simple demo to demonstrate this. It is a Console Application compiled in Visual Studio 2010 Beta 2 and is using .NET Framework 4 Client Profile.
Opening the output.pdf file, you would expect to find the text "123" on the first page and "abc" on the second page. However, both pages have the text "123". Am I doing something wrong, or is there a bug in the library? I really need to get this to work for my application, and I already have too much time invested to switch to a different PDF writer. Thanks! ~David |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Jun 10 at 6:36AM |
|
Hi!
You have different files with identical form field names. After the merge both documents are one new with the same formfield names. So the content is a bit mixed up. For me it's clear. The only difference is that i had thought that in both fields is "abc" ;-) I would change the fieldnames before merging. You can get all properties setting a new one with a name combined with an on going number over the other formfields.... Cheers and welcome here, Ingo |
|
![]() |
|
DAVe3283
Beginner
Joined: 04 Jun 10 Location: USA Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Jun 10 at 4:25PM |
|
Thanks, I'll try that and see if I can get it to work.
I would have though they would be "abc" as well, but they weren't. Strange. Is there a way to rename a field, rather than re-creating every field? ~David |
|
![]() |
|
Jack
Team Player
Joined: 03 Jun 09 Location: Lompoc, CA Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Jun 10 at 4:28PM |
|
I ran into the same problem in my program. It turned out that it was an issue with the way that Acrobat handles fields. If you go into Acrobat and set up a form with two fields named "Test_1" and then put "123" into one of the fields, it will show up in both. Rename one of the fields to "Test_2" and the problem goes away.
My solution was to load a form from a template and then add the page number to the front of each field and then fill the fields. Some of my forms have master and detail fields too. For them, when I am setting up the form, I add the detail number to the end of the form field. My uses have been pretty routine form filling so I probably have not run across every possible test, but QuickPDF has not let me down yet. I hope this is helpful. Jack |
|
![]() |
|
Jack
Team Player
Joined: 03 Jun 09 Location: Lompoc, CA Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Jun 10 at 4:37PM |
|
Here is the code I used to add the page number to the form fields:
procedure TPDF.AddPageNoToFieldNames(var oPDF: TQuickPDF; iPageNo: Integer);It's in Delphi, but it's pretty clear what it's doing. Jack |
|
![]() |
|
DAVe3283
Beginner
Joined: 04 Jun 10 Location: USA Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Jun 10 at 5:51PM |
|
Ingo:
I was able to re-create the fields and get the result I wanted. However, the re-creation procedure takes a very long time (filling and merging 4 pages of fields takes a fraction of a second, recreating those ~50 fields takes 3-4 seconds). Very strange. Thanks for getting me going! Jack: That is pretty much what I am doing with my program. Your method worked great, and much faster than re-creating every field. It was exactly what I was looking for! Thank you! Edited by DAVe3283 - 04 Jun 10 at 5:53PM |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store