Skip to main content
boilermaker73
Inspiring
December 11, 2022
Question

JS for Acrobat API Methods, Standards & Acceptable Practice

  • December 11, 2022
  • 2 replies
  • 1079 views

While I often refer to the JS for Acrobat API reference in working with interactive PDF forms, I have to admit that I find many of the examples to be oversimplified and lacking when it comes to determining what criteria should be used to determine what is/isn't acceptable practice regarding an appropriate trigger or event to use for a particular JS method to best accomplish the task at hand. As I am sure most will agree and as Thom parker has pointed out to me and many others over the course of time on the forum, while there may appear to be more than one way to accomplish a certain task, they're not all created equal in which event some are much better suited than others whereas some definitely unacceptable. Unfortunately, the best or correct choice is not always as clear cut as using camel case text for form field names. In brief, while I do believe the JS for Acrobat API reference is indispensable for those who work with interactive PDF forms like myself, I do believe the aforementioned to be a shortcoming of the JS for Acrobat API reference. All considered, I really believe someone like Thom should author a book that focuses on standards and acceptable practice as well as more indepth examples for those like myself. Needless to say, I would be first in line to purhase it. The best analogy I can provide is that well over 10 years ago, Thom provided an indepth article including an example to show exactly how to create a popupMenuEx programatically. This has to be without a doubt one of the best tutorials if not the best I have ever read. Needless to say, the information gleaned from this tutorial alone was exceptional and well worth the read. Unfortunately, nowhere can it be found online today in which case nothing I have found comes close. Granted, a lot of what we do learn comes with age and experience but I have yet to find any indepth tutorials online regarding this subject matter to help shorten the learning curve comparable to what the W3Schools provide on their website for just about any programming language imaginable. Any thoughts, suggestions regarding this subject matter are most appreciated.

This topic has been closed for replies.

2 replies

Joel Geraci
Community Expert
Community Expert
January 13, 2023

Book? What is this object "book" you speak of?

I've developed a set of best practices and even libraries of JavaScript that extend the native Acrobat JS Objects with methods found in modern browsers. Unfortunately, for most users of these forums, they'd all go over their heads.

Sometimes the best practice is to use what you can understand and modify to your own needs even if it's less efficient.

boilermaker73
Inspiring
January 13, 2023

In response to 'Book? What is this object "book" you speak of? Boy, I am beginning to believe that the 'English' language has really become a poor modum of communication whereby several people read the same words and provide several different interpretations of what they have read. In no disrespect, please reread my initial post. I also seem to detect some arrogance in the reply 'Unfortunately, for most users of these forums, they'd all go over their heads'. Oh well, I probably just offended someone again by this reply.

Thom Parker
Community Expert
Community Expert
December 12, 2022

Just goes to show how much money there is in HTML JS compared to Acrobat JS.  

 

Of course, there's always https://www.pdfscripting.com/

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
boilermaker73
Inspiring
December 13, 2022

I agree Thom. Unfortunately, I believe those who design/develop websites and promote their HTML forms would have everyone believe that PDF is dead. I for not am not one of them.