• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
5

How to extract field properties, from PDF form?

Participant ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

I have 40+ forms and I want to make sure that common fields have the same names and same formats. This would greatly help me in storing and sorting the entries.

Apart from that i want to make sure the formatting is consistent through all the forms. Is there a way i can extract this data from the pdf forms preferably to excel file, so that i can check / make corrections.

the properties i am looking for are:

Field Name, Field Type ,Field Format, Font ,Font Size ,Font Color, Alignment ,Multiline, Date Format ,Character Limit.

I have tried the below Script but still unable to extract the format information, Like phone, zipcode, Date, SSN.

 

var field = this.getField("clm_bdate");
for (x in field) {
console.println(x);
try {
console.println(field[x]);
}
catch(err) {
console.println("Error: " + err);
}
}

TOPICS
JavaScript , PDF , PDF forms

Views

440

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 01, 2024 May 01, 2024

You should use the FORMREPORT plugin, which is part of the (free) abracadabraTools:

https://www.abracadabrapdf.net/?p=972

Votes

Translate

Translate
Community Expert ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

> I have tried the below Script but still unable to extract the format information, Like phone, zipcode, Date, SSN.

 

Those settings can't be read using a script, unfortunately, only written. You would need a plugin or stand-alone tool to do it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

Thanks try67.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

Hi try67, 

Is it possible to extract the field inuput values and validate the format based on the field name. 

Example: Field name: DOB - Field Value: "any date " if not it should show error.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

In theory, yes, but how would you know if the value is correct or not, if you don't know the format it has?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

I have created a javascript which will update the values in  fields based on the format , However in my case if the format was not set to date the script will set the value as "text", while checking the entire form field i miss to identify the error. 

I have attached screenshot below for your reference. 

 

Magendravarad28403894r8lu_0-1714515213017.jpeg

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 01, 2024 May 01, 2024

Copy link to clipboard

Copied

I don't understand what you mean. If you know that the "DOB" field should have a date, then you should also know what date pattern that date should have. If that's the case then you can validate the value of the field against that pattern. If you don't know the pattern then you can't really validate it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 01, 2024 May 01, 2024

Copy link to clipboard

Copied

try 67 As i have mentioned earlier I have specific requirement which the forms fields must be consistent. For Example DOB field should be date format and mm/dd/yyyy format. however for multiple files I cannot check each field details, So I want to do validation using JS . 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 01, 2024 May 01, 2024

Copy link to clipboard

Copied

And as I said, it can't be done using JS.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 01, 2024 May 01, 2024

Copy link to clipboard

Copied

Thank you so much Try67. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 01, 2024 May 01, 2024

Copy link to clipboard

Copied

You should use the FORMREPORT plugin, which is part of the (free) abracadabraTools:

https://www.abracadabrapdf.net/?p=972

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 01, 2024 May 01, 2024

Copy link to clipboard

Copied

Thanks for sharing the link JR, I will have it tested 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 02, 2024 May 02, 2024

Copy link to clipboard

Copied

LATEST

Thank you so much JR Boulay, It works as expected. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines