Is there a way to determine the number of fields in a form-fillable PDF in Adobe Acrobat?
At my work use a series of PDFs for the sale signs that we make. Some are 8 signs per page, some 12, and some 16. I'm trying to figure out a way to programmatically detect what size signs are currently open in Acrobat without having to rely on gimmicks like checking the file name.
Form-Fillable PDF: Number of Fields?
- FanaticGuru
- Posts: 1908
- Joined: 30 Sep 2013, 22:25
Re: Form-Fillable PDF: Number of Fields?
This will tell you the number of fields in the active PDF open in Adobe Acrobat.MaxAstro wrote:Is there a way to determine the number of fields in a form-fillable PDF in Adobe Acrobat?
At my work use a series of PDFs for the sale signs that we make. Some are 8 signs per page, some 12, and some 16. I'm trying to figure out a way to programmatically detect what size signs are currently open in Acrobat without having to rely on gimmicks like checking the file name.
Code: Select all
F12::
AFormAut := ComObjCreate("AFormAut.App")
MsgBox % AFormAut.Fields.Count
return
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
Re: Form-Fillable PDF: Number of Fields?
When I run that script, I get the error "Class not registered".FanaticGuru wrote:This will tell you the number of fields in the active PDF open in Adobe Acrobat.FGCode: Select all
F12:: AFormAut := ComObjCreate("AFormAut.App") MsgBox % AFormAut.Fields.Count return
Re: Form-Fillable PDF: Number of Fields?
MaxAstro, I get the same problem if I run it from Scite4AHK. But if I double-click in Explorer to run it, it works fine. The Internal AHK gives me problems with many COM objects.
By the way, it needs Acrobat itself to be open, I believe, not FormsCentral.
Regards,
burque505
By the way, it needs Acrobat itself to be open, I believe, not FormsCentral.
Regards,
burque505
- FanaticGuru
- Posts: 1908
- Joined: 30 Sep 2013, 22:25
Re: Form-Fillable PDF: Number of Fields?
That is the error I would expect if the hotkey was run without a PDF open in the full version of Adobe Acrobat. Will not work with Acrobat Reader or other free PDF viewers.MaxAstro wrote:When I run that script, I get the error "Class not registered".
Also as mentioned running scripts through Scite4AHK can sometimes cause problems. The script works running through Scite4AHK for me but sometimes depending on your setup Scite4AHK can cause permission problems.
FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
Re: Form-Fillable PDF: Number of Fields?
Ah, I see the problem - I need it to work from Reader.
That's okay, I was able to do some magic with GDIP image search to get the information I needed another way.
That's okay, I was able to do some magic with GDIP image search to get the information I needed another way.
Re: Form-Fillable PDF: Number of Fields?
Acc might work. If someone has a link to such a pdf, I could do some tests myself.
Acc library (MSAA) and AccViewer download links - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201
Acc library (MSAA) and AccViewer download links - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: Google [Bot] and 294 guests