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 > Sample Code
  New Posts New Posts RSS Feed - Duplicate form fields
  FAQ FAQ  Forum Search   Register Register  Login Login

Duplicate form fields

 Post Reply Post Reply
Author
Message
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Topic: Duplicate form fields
    Posted: 28 Apr 11 at 10:14AM
Quick PDF Library allows you to add duplicate form fields to PDF files. This means that two or more form fields share the same name and if one of the form fields is updated then the other form fields are also updated.

QP.NewFormField('Name', 1);
QP.SetFormFieldBounds(1, 100, 500, 200, 100);
QP.SetFormFieldBorderColor(1, 1, 0, 0);

QP.NewFormField('Name', 1);
QP.SetFormFieldBounds(2, 100, 400, 200, 100);
QP.SetFormFieldBorderColor(2, 0, 1, 0);
QP.SaveToFile('dupfields.pdf');

If you use the GetFormFieldValueByTitle or SetFormFieldValueByTitle functions then these functions will only work with the first occurrence of the field that has that title, it will not work with the duplicate field. So it is better to use the index with the GetFormFieldValue and SetFormFieldValue functions, instead of the title.
Back to Top
nirnir View Drop Down
Beginner
Beginner


Joined: 12 May 11
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote nirnir Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 11 at 1:44PM

Hi,

I couldn't create two fields with same name .
calling NewFormField with existing field name returns
The same field index .
Do you have a Delphi working example of how adding duplicate fields ?
Back to Top
iGapper View Drop Down
Beginner
Beginner
Avatar

Joined: 09 May 10
Location: Switzerland
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote iGapper Quote  Post ReplyReply Direct Link To This Post Posted: 06 Jun 11 at 9:08PM
Hi Nirnir,
 
Maybe you could try the release 25 of QuickPDF Library. This version will allow you to add fields with same name.
 
For me, now, it works. Nice job !!
 
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