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 - Form fields  with same name
  FAQ FAQ  Forum Search   Register Register  Login Login

Form fields with same name

 Post Reply Post Reply
Author
Message
geonetwork View Drop Down
Team Player
Team Player
Avatar

Joined: 12 Mar 07
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote geonetwork Quote  Post ReplyReply Direct Link To This Post Topic: Form fields with same name
    Posted: 05 Jun 18 at 12:00PM
In my applications I have some fields across more pages that share the same name and if one of the form fields is updated then the other form fields are also updated.
Since version 13 is not more longer possible to have more fields with same name!

If you try to compile the code with version 12 all it's ok: three fields with same name that share same value. With version 13, 14 and 15 there will be only one field!

procedure TForm1.Button1Click(Sender: TObject);
var
  QP: TDebenuPDFLibrary;
  nFieldIndex: integer;
  nFieldCount: integer;
  i,n: integer;
begin
  QP:=TDebenuPDFLibrary.Create;
  try
    QP.UnlockKey('xxxxxxxxxxxxxxxxxxxxxx');
    QP.SetOrigin(1);
    QP.SetMeasurementUnits(1); // mm.
    QP.SetPageDimensions(210, 297); // A4
    QP.SetTextColor(0,0,0);
    QP.SelectPage(n);
    nFieldCount:=1;
    QP.AddFormFont(QP.GetFontID(4));
    QP.SetTextSize(10);
    for i:=1 to 3 do begin
      nFieldIndex:=QP.NewFormField('FIELD'+IntToStr(nFieldCount),1);
      QP.SetFormFieldBounds(nFieldIndex,40,46+(i-1)*15,100,5);
      QP.SetFormFieldAlignment(nFieldIndex,0);
      QP.SetFormFieldStandardFont(nFieldIndex,4);
      QP.SetFormFieldTextSize(nFieldIndex,0);
    end;
    Inc(nFieldCount);
    QP.SaveToFile('c:\temp\output.PDF');
  finally
    QP.Free;
  end;
end;

Is this a bug? Is there any workaround?


Edited by geonetwork - 05 Jun 18 at 1:12PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2772
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 06 Jun 18 at 8:31PM
I think version 12 had the bug ;-)
As far as i know it works like it's designed - only unique formfield names.


Cheers,
Ingo

Back to Top
geonetwork View Drop Down
Team Player
Team Player
Avatar

Joined: 12 Mar 07
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote geonetwork Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jun 18 at 10:24AM
Hello Ingo, thank you for your reply.

It isn't a bug of version 12. The behavior is the same with version 10 and with the prior versions (i'm using QuickPdf since version 5)

In my opinion is not possible to prevent the inclusion of two fields with the same name at a random time, without considering the past. 

How can I justify this change to my customers? I can't tell their: "you have to repeat the usual header for each page of the document"!

I add that in the documentation of version 13 there is no reference to this change and that Adobe Acrobat allows you to do it without problems since the first version.

I also wrote to the support


Edited by geonetwork - 13 Jun 18 at 3:29PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2772
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 08 Jun 18 at 7:59PM
This is a user-forum for helping users.
I've told you the official statements from the publishers regarding form field names.
That's all i can say.
If you're a user starting from version 5 (i was only a little bit earlier) then you shouldn't ask ;-)
There's no need to tell it to your customers.
You can change form field names programmatically (adding the actual page number should be enough).
To which support you've written?
Perhaps it's the wrong one cause the Debenu team moved to Foxit?

Cheers,
Ingo

Back to Top
geonetwork View Drop Down
Team Player
Team Player
Avatar

Joined: 12 Mar 07
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote geonetwork Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jun 18 at 8:16AM
Ok, I'm sorry, I will not make this mistake again.

Just for the sake of precision: I know that I can change the names of the fields, but that's not what I want. I want that if a user writes something in the "name" field of the first page (after it has been created), he will also find it in the second and third pages. Until version 12 the PDFs created by my applications allowed it, now no more. That's all.

P.S. in the meantime the support has answered me and they are investigating the problems
Back to Top
geonetwork View Drop Down
Team Player
Team Player
Avatar

Joined: 12 Mar 07
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote geonetwork Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jun 18 at 9:08AM
The technical support has suggested me a workaround. To make the fields work again as in version 12 and earlier (possibility to specify more form fields with the same name that automatically take the same value and other little different behaviors) simply insert the instruction:

QP.SetNeedAppearances(1);

since version 13, in fact, the default value of this flag is changed (of course there is a technical explanation behind this change ...)


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