Print Page | Close Window

GetFormFieldTitle appends a period

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3700
Printed Date: 28 Apr 24 at 6:28AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: GetFormFieldTitle appends a period
Posted By: waynefulcher
Subject: GetFormFieldTitle appends a period
Date Posted: 23 Apr 19 at 7:34PM
I am using Delphi 7 and QuickPDF 16.x
I was curious if anyone knows why some field names returned from GetFormFieldTitle() method sometimes contains a period (.) at the end of the field name? And along the same lines it will return the actual field name I input when designing the PDF (without the period) but for that field there seems to be no valid Page data.
Like my other questions, I am using PhantomPDF 9.x to edit pdfs.
Below is an example of the code I am using to list out fields in the pdf.

    for FieldIX := 1 to qpdf.FormFieldCount do begin
      sLine := ' Pg: '+IntToStr(qpdf.GetFormFieldPage(FieldIX))+
               ' Ht: '+FloatToStr(qpdf.GetFormFieldBound(FieldIX, PDF_Bound_Height))+
               ' Wd: '+FloatToStr(qpdf.GetFormFieldBound(FieldIX, PDF_Bound_Width));
      
      sortedFields.Add(PadR(qpdf.GetFormFieldTitle(FieldIX), maxFldWidth) + sLine) ;
    end ;

A snippet of the output from the above code is:

IntRateChgeffective                 Pg: 0 Ht: 0 Wd: 0
IntRateChgeffective.                Pg: 1 Ht: 12 Wd: 84.375
LateChargeAmount                    Pg: 1 Ht: 12 Wd: 45.75
LateChargeDays                      Pg: 0 Ht: 0 Wd: 0
LateChargeDays.                     Pg: 1 Ht: 12 Wd: 21.375
LateChargeGreaterLess               Pg: 0 Ht: 0 Wd: 0
LateChargeGreaterLess.              Pg: 1 Ht: 12 Wd: 57.75
LateChargeMinimum                   Pg: 0 Ht: 0 Wd: 0
LateChargeMinimum.                  Pg: 1 Ht: 12 Wd: 70.91
LateChargePercentage                Pg: 0 Ht: 0 Wd: 0
LateChargePercentage.               Pg: 1 Ht: 12 Wd: 48


For each of the fields listed above, there is only 1 instance of a field with those names actually in the pdf.
So for example I have only 1 field called LateChargeDays there is only one field.
Oddly enough some fields, such as LateChargeAmount, it seems to return the correct data, meaning there is not one with a period at the end and the page data is correct for the field without the period.

Thanks for any help understanding how this is all supposed to work and why.







Replies:
Posted By: Ingo
Date Posted: 23 Apr 19 at 10:17PM
It would be really better to post longer code snippets and sample pdfs (there are many file hoster out there).

What you're written regarding the points has to do while using radio buttons or checkboxes.
Here's one of my samples a partly extraction from a form.
Have a look and then you know while there are more than one form field INSIDE for one field ;-)

Radiobutton;No List-/Combobox;;Input;Not printable;Visible;;0;1. SubName for Sex: MALE
Radiobutton;No List-/Combobox;;Input;Not printable;Visible;;0;RadiobuttonGroup: Sex;MALE
Radiobutton;No List-/Combobox;;Input;Not printable;Visible;;0;2. SubName for Sex: FEMALE

The radio button "Sex" offers two options "MALE" and "FEMALE".
The options are subnames grouped under "Sex".
As a default in my sample the radio button group is set to "MALE".



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk