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

Auto detect input fields in a flat PDF via the SDK. Is this possible?

New Here ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

I have a flat PDF (no Acroform fields). Just a flat PDF. Is it possible, via the API, to get a list of possible input fields? (Text fields, check boxes, etc.) This is what I want, only delivered via an API call (see link->):  Automatic Field Detection in Authoring

If the Adobe SDK does not do this, does anyone know of any API that does something like this?

TOPICS
Acrobat SDK and JavaScript

Views

4.7K

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 , Sep 19, 2018 Sep 19, 2018

I was laughing at Bernd's casual suggestion for writing a field detection plug-in. This is not a trivial task.  It's the kind of thing you build an AI for.

However, what you are asking for is a PDF library or Tool for building an external application.  There are many PDF libraries and single function development tools. I am not aware of any that do auto-form field detection, although it wouldn't surprise me if there were some out there. For example I just did a google search on "Auto Detect PDF

...

Votes

Translate

Translate
Community Expert ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

Depends.  If you mean the JavaScript API, then no, there is not really any way to access the Form field detection feature. This is a built in Adobe specific thing that they control. It's not part of the general PDF operation included in either the JS or plug-in SDK.

However, there are hooks into this functionality that provide some access. For example, this feature is a command on the "Action" editor. So it can be used in an Action, which is a type of automation.  Action commands can also be activated from a plug-in, but the plug-in doesn't have any control over how the field detection proceeds, it's just like running a menu item.  You can execute it, but then Acrobat does what it does, including any popup dialogs and messages that the user has to respond too.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
New Here ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

Maybe I'm in the wrong area? I don't want a plugin or a menu item. I want to call a function from C++ (or C#) code. Acrobat will not be running.

I want to load a PDF and detect all possible input text fields on the page. Example:

  myApi->LoadPDF("pdfDocument.pdf")

  CString xmlString = GetAllPossibleInputFields();

Where an input field is NOT an acroform field, but rather a PROBABLE input field based on OCR intelligence.

Thanks.

Glad my question was a good for a laugh!

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 ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

I was laughing at Bernd's casual suggestion for writing a field detection plug-in. This is not a trivial task.  It's the kind of thing you build an AI for.

However, what you are asking for is a PDF library or Tool for building an external application.  There are many PDF libraries and single function development tools. I am not aware of any that do auto-form field detection, although it wouldn't surprise me if there were some out there. For example I just did a google search on "Auto Detect PDF Form Fields".  The first page is all articles/forum threads about using Acrobat to autodetect fields, but at the bottom was this online tool for doing it.

Form Field Detector - Accusoft

It looks like an online service you can connect to from your own HTML page using JS.

Also, I haven't checked but I maybe this capability is avaliable from the official PDF Library, distributed by DataLogics:

https://www.datalogics.com/products/pdf/pdflibrary/

And it is in C++.  You'll find many of the PDF tools and libraries are Java and .Net 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
New Here ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

LATEST

Thank you. I really appreciate your informative reply.  I am familiar with several PDF tools do form field detection, but I haven't found one yet that does this strictly from a function call without the use of another application overlay or cloud service (both of which will not work for my situation.)

Appreciate everyone's time.

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 ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

You can create your own plugin for this.

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 ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

Ha Ha  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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