Blog
Free Acrobat Automation Tools.Adobe acrobat x pro javascript debugger free download
Looking for:
Adobe acrobat x pro javascript debugger free download
Этого не может. Стратмор был уверен, что предусмотрел. – Сьюзан, – сказал он, подходя ближе. – В чем .
In using Acrobat XI Standard, I want to use the javascript debugger as you state in your article. I can not get to the JavaScript debugger enable check box to automatically use CTRL + J to upload. Is there another technique/step to use to get this dialog up and running. Jun 01, · The JavaScript debugger in Acrobat lets you review your code line by line, set breakpoints, and inspect variables using the debugger dialog. To enable JavaScript Debugger, go to Edit > Preferences > JavaScript, and then select the Enable JavaScript debugger after Acrobat . Adobe Acrobat Pro is one of the best programs for those who want to create, edit and read PDF files, but if you find that your version suffers from bugs and glitches, you need to download this update. This Adobe Acrobat Pro Update fixes some of the more common issues that others complained about and experienced in the past. May 07, · Since Acrobat Reader does not provide access to the Debugger through its menu items or the Ctrl-J key sequence, the only ways to access the Debugger are to execute a JavaScript, cause an error, or customize the user interface (for example, you could add a button that runs a JavaScript causing the Debugger to appear).
– Я в это не верю. Всем известно, что невзламываемый алгоритм – математическая бессмыслица. Хейл улыбнулся: – Ну конечно… Принцип Бергофского. – А также здравый смысл! – отрезала. – Кто знает… – Хейл театрально вздохнул.
Judging from the Acrobat discussion forums, getting a script to work is one of the biggest problems around. The answer is to role up your sleeves and figure out what’s wrong–something we call debugging.
The name of the game in software debug is to isolate the issue. More often than not, just narrowing down the real source of the error is enough to identify the specific issue and fix it. It is very easy with complex forms and code to be misled by surface behavior. Everything we’ll discuss in this article is about developing the skills and tools to correctly implement this one concept.
Isolating the real source of an error is the first and most important step in finding and fixing a problem–it’s the Golden Rule of debug. It’s about paying attention to the details and there is no substitute. Programming languages by their nature follow very strict rules. Acrobat JavaScript is much easier to work with and much more forgiving than other programming languages.
But it is still a programming language, and thus has rules: Syntax rules, logic rules and general operational rules. In order to do debug, it is necessary to have some sense of these rules.
You don’t have to memorize anything. It’s only important to have a sense of what’s going on and a reference. The reference is where the details come from. A programming reference can be very cryptic to the novice. But don’t get intimidated. You absolutely need the reference. A reference is not like other books. You can’t read it from beginning to end to make sense out of it. If you think you’ve found a “thing” in the code that is the source of the problem, you open up the reference to the entry for that thing and see what it has to say.
The trick to using any reference is to only look at the things that already make sense to you. Don’t think too hard about it. It’s very easy to over-think or read too much into reference data. Reference entries usually provide very terse and incomplete information that assumes an overall knowledge of the topic.
In other words, they aren’t much good unless you already know what you’re doing. That’s why you don’t want to look too hard. If you’re new to the topic, then you just want to compare the reference entry to the “thing” in the code.
After doing this a few times and skipping around in the reference, everything will become much clearer. But don’t try to force it. You’ll need two references. The first one is a reference on Core JavaScript.
This is the programming language used to script Acrobat. The reference will provide basic information on JavaScript keywords, syntax and usage. This reference only contains information on the functions and properties specific to Acrobat.
It does not contain any information on the core language. It is very important to understand the difference between what is core and what is Acrobat specific, and this is just the kind of thing you’ll learn by using the two references. The discussion so far begs the question, “How exactly do you start isolating the bug?
And that tool is the console window, for which I’ve already written an article and produced a video. It’s that important. Since I’ve already written about it, I won’t provide the details here, but the console is important for three reasons.
First, it’s a place to test code. If a small section of code is problematic for any reason, you ought to be working out the kinks in the console window where you can quickly make changes and see the results. Second, Acrobat displays all unhandled exceptions in the console window. So if there is a problem, always look in the console window first to see if an exception has been reported. Third, you can add trace statements to your code that will display in the console window.
This is the number-one way to isolate a problem. Pepper the code with trace statements and then watch them print in the console window as the code runs. This line of code, when run, will print the words “this is a trace statement” in the console window. This is a trace statement, and placing lines like this one in various locations in your script will allow you to find the exact piece of problem code.
A trace statement can print out a simple string so you know the code ran to at least that place, or it can print out a value being calculated by the script. Either way, this is the most powerful tool in your debug toolset. Our job is to narrow the problem to the smallest piece of code possible. There are several different techniques that can be used separately or combined. To see an example of this in action, I wrote an article that walks through a debug session on a single piece of code that contains several common errors called Why doesn’t my script work?
When the action is triggered, the script executes. Based on JavaScript version 1. You can tie Acrobat JavaScript code to a specific PDF document, a page, field, or button within that document, or a field or button within the PDF file, and even to a user action. JavaScript is useful for XML forms. JavaScript enables automated forms handling, Web and database communication, commenting, and user-interface capabilities.
For more information, see Developing Acrobat applications using JavaScript. Of course, this information is easily available in the Document Properties dialog. The advantage to using the Console Window is to make this information available to copy to the system clipboard for use with another script in Acrobat or for something else.
Besides testing code, the Console Window has one other important role in debugging JavaScript. It is the standard location for displaying status and error messages. The Acrobat JavaScript environment has a built-in error handling system. When something goes wrong, this error-handling system usually displays some helpful message sometimes in the Console Window, so this is the first place to look when things aren’t working.
In addition, you can create your own status and error messages to display here. As an example, let’s execute something that will cause an error. Enter and run the following line of code in the Console Window:. This line of code instructs Acrobat to open a file xx. Acrobat responds by generating an error, which is displayed by the Console Window, shown in Figure 8.
This message is critical to understanding why the code failed, especially if the function call is buried in several lines of code inside another script. Always check the Console Window first when something goes wrong.
Note that the second message on the line indicates a security error. For our purposes, this is an erroneous and unhelpful message.
There was no real security error, and while it may then seem that Adobe is deliberately trying to either terrify or confuse us, there is a reason the message is being displayed. In fact, the message is not related to the JavaScript engine at all. It is the result of the Acrobat security model, which was made much more robust in versions 9, X, and XI by adding a security layer.
This layer blocks operations that don’t fit with Acrobat’s sense of rightness. JavaScript operations or errors that relate to external resources on the web or local file system tend to spook this security layer, which then throws out miscellaneous security errors. If you work with Acrobat JavaScript for any length of time, you’ll find all sorts of operations that have nothing to do with security, but nonetheless generate security errors.
We can also create our own messages for display in the Console Window. This object provides a few functions for manipulating and accessing the Console Window, but for our purposes here the console.
This function displays a single line of text on the next available line in the Console Window. The following line of code displays the words “Hello Acrobat. The console. Just place a few console. It is up to the developer to decide what information to display.
This information should be relevant to the state of the script. For example, the following line helps us understand how JavaScript events work in Acrobat. The code can be placed in any script location in a PDF file. It is a good practice to use this code or something like it whenever you start a new document scripting project to get a feel for how the different scripts will interact.
Watch the Console Window to monitor the sequence of scripts that are executed as you open and close the document, navigate between pages, move the mouse around the document or perform other actions. If you are developing scripts that will be used in Adobe Reader, then it is a good idea to be able to test and debug them in Reader. Adobe added Console Window support to Reader in version 7. However, setting up Reader to actually display the Console Window was very difficult.
It required installing special scripts and manually changing Acrobat settings in either the Windows Registry or the Macintosh settings files. It has become much easier in Reader XI. There is only one thing you need to be able to do to use the Console Window, and that is to display it. Displaying the Console Window in Reader is a bit more difficult than one might think it should. Reader does not have the keyboard shortcut, a menu item, or a tool button for displaying the Debugger Window.
This leaves only two options: create your own tool button or menu item or cause a deliberate error. This is how you throw exceptions in JavaScript. But it isn’t the best method. A better technique is to create a tool button or menu item that displays the console directly with the “console. You can download a script for a tool button here,. And here is a handy script for adding a “Console Window” menu item to the “View” menu in Reader.
This script will need to be written into a file with the “. It is best to place it in the “User” folder. Use it early and often to test and debug scripts, and to automate processes in Acrobat. Try Acrobat DC. Learn how to edit PDF. Get started. Automating bookmark creation with Acrobat JavaScript. Rearrange PDF pages. Create PDF online. Convert Word to PDF online. Convert Excel to PDF online.
Compress PDF online. Sign Microsoft Word documents. Create electronic signatures.
Download latest version of Adobe Acrobat X Pro Update for Windows. Safe and Virus Free. In using Acrobat XI Standard, I want to use the javascript debugger as you state in your article. I can not get to the JavaScript debugger enable check box to automatically use CTRL + J to upload. Is there another technique/step to use to get this dialog up and running. Adobe Acrobat Pro is one of the best programs for those who want to create, edit and read PDF files, but if you find that your version suffers from bugs and glitches, you need to download this update. This Adobe Acrobat Pro Update fixes some of the more common issues that others complained about and experienced in the past. The automation tools provided here are all examples showing how powerful using Acrobat JavaScript can be in decreasing task completion time, thus increasing productivity and efficiency. Other automation tools are available in the Members Only Area of this site. Feel free to browse the Download Estimated Reading Time: 3 mins. Jun 01, · The JavaScript debugger in Acrobat lets you review your code line by line, set breakpoints, and inspect variables using the debugger dialog. To enable JavaScript Debugger, go to Edit > Preferences > JavaScript, and then select the Enable JavaScript debugger after Acrobat .
Adobe acrobat x pro javascript debugger free download
Adobe Acrobat Pro is one of the best programs for those who want to create, edit and read PDF files, but if you find that your version suffers from bugs and glitches, you need to download this update. This Adobe Acrobat Pro Update fixes some of the more common issues that others complained about and experienced in the past. Jan 11, · I have an Acrobat X Standard CD but my new computer doesn’t have a CD player and the old one is fried. I was looking to download a copy of it from Adobe but I can’t find where to download from. Any help would be appreciated. Thank you. Neal P.S.: I don’t want to download . May 07, · Since Acrobat Reader does not provide access to the Debugger through its menu items or the Ctrl-J key sequence, the only ways to access the Debugger are to execute a JavaScript, cause an error, or customize the user interface (for example, you could add a button that runs a JavaScript causing the Debugger to appear). In using Acrobat XI Standard, I want to use the javascript debugger as you state in your article. I can not get to the JavaScript debugger enable check box to automatically use CTRL + J to upload. Is there another technique/step to use to get this dialog up and running.
Jan 11, · I have an Acrobat X Standard CD but my new computer doesn’t have a CD player and the old one is fried. I was looking to download a copy of it from Adobe but I can’t find where to download from. Any help would be appreciated. Thank you. Neal P.S.: I don’t want to download . In using Acrobat XI Standard, I want to use the javascript debugger as you state in your article. I can not get to the JavaScript debugger enable check box to automatically use CTRL + J to upload. Is there another technique/step to use to get this dialog up and running. The automation tools provided here are all examples showing how powerful using Acrobat JavaScript can be in decreasing task completion time, thus increasing productivity and efficiency. Other automation tools are available in the Members Only Area of this site. Feel free to browse the Download Estimated Reading Time: 3 mins. Adobe Acrobat Pro is one of the best programs for those who want to create, edit and read PDF files, but if you find that your version suffers from bugs and glitches, you need to download this update. This Adobe Acrobat Pro Update fixes some of the more common issues that others complained about and experienced in the past. May 07, · Since Acrobat Reader does not provide access to the Debugger through its menu items or the Ctrl-J key sequence, the only ways to access the Debugger are to execute a JavaScript, cause an error, or customize the user interface (for example, you could add a button that runs a JavaScript causing the Debugger to appear).
Adobe Acrobat Pro is one of the best programs for those who want to create, edit and read PDF files, but if you find that your version suffers from bugs and glitches, you need to download this update. This Adobe Acrobat Pro Update fixes some of the more common issues that others complained about and experienced in the past. May 07, · Since Acrobat Reader does not provide access to the Debugger through its menu items or the Ctrl-J key sequence, the only ways to access the Debugger are to execute a JavaScript, cause an error, or customize the user interface (for example, you could add a button that runs a JavaScript causing the Debugger to appear). Jan 11, · I have an Acrobat X Standard CD but my new computer doesn’t have a CD player and the old one is fried. I was looking to download a copy of it from Adobe but I can’t find where to download from. Any help would be appreciated. Thank you. Neal P.S.: I don’t want to download .
I once had an argument with a client over this line of code:. She asserted that according to the rules of English, the semicolon at the end of the sentence needed to be inside the quotes, i. To begin with, this is not a sentence, it’s a text string, and secondly, it’s not English, it’s programming. The rules we follow are the rules laid out by the Core JavaScript Reference.
The quotes are used to delimit a text string. There must be one at the beginning of the string and a matching quote at the end of the string. This actually happens to be one of the most common punctuation errors. It is caused by copying code from an e-mail message or word processor. Be very careful when copying code from a source that is not strictly plain text.
Finally, the semicolon terminates the line of code. A misuse of any of these punctuation characters could easily result in a bug. These characters are used to delimit nested entities, both code and data. It’s very common when writing complex or long code to mismatch a bracket or quote, which will always result in a bug. This is the assignment operator. There are other examples, but in general, if your code looks right, but doesn’t work and doesn’t throw an obvious error, it’s possible you have an improper operator.
Look closely and check the reference for the proper meaning of the operators you are using. Bug 4: Bad names, or name paths, are very common with form scripting. In form scripting, each form field is named. It is critical that when used in a script, fields are properly referenced and spelled. Bug 5: Another common form bug is invalid data. Empty fields can return a null value and calculations can result in non-numbers, such as infinity, or even text strings.
A bad value in one place can cascade into other parts of the form where it’s used in a calculation. To isolate this kind of error, you have to trace backward to find the original bad value.
To fix it, you need to take steps to ensure the bad value is not propagated. For example, set the initial value of the field to 0, or write code to test calculation results for unacceptable values. Bug 6: The last item on the common bug list, thrown exceptions, is not a bug in the same sense as the others listed. Obviously, there is a bug causing the exception to be thrown and it needs to be fixed. But the point here is that when a script throws an exception, the code execution stops at that point.
Exceptions cause Acrobat to abort operation. To the user and the novice scripter, it may appear that one or more operations not related to the real problem are not working. Without digging deeper and isolating the real problem, the exception can be misleading. Which brings us back to the original point: Do not make assumptions based on the surface behavior of the form.
Check the console window first and then use one of the other debug techniques discussed above to dig deeper. Use your knowledge of scripting and the references to isolate the source of the real error. Try Acrobat DC. Learn how to edit PDF. Get started. Using Acrobat JavaScript with forms. Automating redaction with Acrobat JavaScript and Acrobat 9.
Rearrange PDF pages. Create PDF online. You can tie Acrobat JavaScript code to a specific PDF document, a page, field, or button within that document, or a field or button within the PDF file, and even to a user action.
JavaScript is useful for XML forms. JavaScript enables automated forms handling, Web and database communication, commenting, and user-interface capabilities.
For more information, see Developing Acrobat applications using JavaScript. If you are developing scripts that will be used in Adobe Reader, then it is a good idea to be able to test and debug them in Reader. Adobe added Console Window support to Reader in version 7. However, setting up Reader to actually display the Console Window was very difficult.
It required installing special scripts and manually changing Acrobat settings in either the Windows Registry or the Macintosh settings files. It has become much easier in Reader XI. There is only one thing you need to be able to do to use the Console Window, and that is to display it. Displaying the Console Window in Reader is a bit more difficult than one might think it should.
Reader does not have the keyboard shortcut, a menu item, or a tool button for displaying the Debugger Window. This leaves only two options: create your own tool button or menu item or cause a deliberate error.
This is how you throw exceptions in JavaScript. But it isn’t the best method. A better technique is to create a tool button or menu item that displays the console directly with the “console. You can download a script for a tool button here,. And here is a handy script for adding a “Console Window” menu item to the “View” menu in Reader. This script will need to be written into a file with the “.
It is best to place it in the “User” folder. Use it early and often to test and debug scripts, and to automate processes in Acrobat. Try Acrobat DC. Learn how to edit PDF. Get started. Automating bookmark creation with Acrobat JavaScript. Rearrange PDF pages. Create PDF online. Convert Word to PDF online. Convert Excel to PDF online. Compress PDF online. Sign Microsoft Word documents. Create electronic signatures. Create digital signatures. Create PDFs. Edit PDFs. Export PDFs.
Combine Files. Review and Comment. Scan and Optimize. Mobile PDF. Protect PDFs. PDF Forms. Sign and Send PDFs. Print Production. PDF Standards. Acrobat DC. Acrobat XI. Acrobat X. Acrobat 9. The automation tools provided here are all examples showing how powerful using Acrobat JavaScript can be in decreasing task completion time, thus increasing productivity and efficiency.
Other automation tools are available in the Members Only Area of this site. Feel free to browse the Download Library and read about the tools available. If you don’t see something you wish were there Contact us and let us know.
We will be adding content on a regular basis and new content in always in development.
This tutorial shows you how to work with the JavaScript features in Acrobat 9. See what the all-new Acrobat DC can do for you. Have you written or copied a script with high expectations of all the great things the script would do, only to find out that it doesn’t work?
Well, you have company. Judging from the Acrobat discussion forums, getting a script to work is one of the biggest problems around. The answer is to role up your sleeves and figure out what’s wrong–something we call debugging. The name of the game in software debug is to isolate the issue. More often than not, just narrowing down the real source of the error is enough to identify the specific issue and fix it. It is very easy with complex forms and code to be misled by surface behavior. Everything we’ll discuss in this article is about developing the skills and tools to correctly implement this one concept.
Isolating the real source of an error is the first and most important step in finding and fixing a problem–it’s the Golden Rule of debug. It’s about paying attention to the details and there is no substitute. Programming languages by their nature follow very strict rules.
Acrobat JavaScript is much easier to work with and much more forgiving than other programming languages. But it is still a programming language, and thus has rules: Syntax rules, logic rules and general operational rules. In order to do debug, it is necessary to have some sense of these rules.
You don’t have to memorize anything. It’s only important to have a sense of what’s going on and a reference. The reference is where the details come from. A programming reference can be very cryptic to the novice. But don’t get intimidated. You absolutely need the reference. A reference is not like other books.
You can’t read it from beginning to end to make sense out of it. If you think you’ve found a “thing” in the code that is the source of the problem, you open up the reference to the entry for that thing and see what it has to say.
The trick to using any reference is to only look at the things that already make sense to you. Don’t think too hard about it. It’s very easy to over-think or read too much into reference data. Reference entries usually provide very terse and incomplete information that assumes an overall knowledge of the topic. In other words, they aren’t much good unless you already know what you’re doing. That’s why you don’t want to look too hard. If you’re new to the topic, then you just want to compare the reference entry to the “thing” in the code.
After doing this a few times and skipping around in the reference, everything will become much clearer. But don’t try to force it. You’ll need two references. The first one is a reference on Core JavaScript. This is the programming language used to script Acrobat. The reference will provide basic information on JavaScript keywords, syntax and usage.
This reference only contains information on the functions and properties specific to Acrobat. It does not contain any information on the core language. It is very important to understand the difference between what is core and what is Acrobat specific, and this is just the kind of thing you’ll learn by using the two references.
The discussion so far begs the question, “How exactly do you start isolating the bug? And that tool is the console window, for which I’ve already written an article and produced a video. It’s that important. Since I’ve already written about it, I won’t provide the details here, but the console is important for three reasons.
First, it’s a place to test code. If a small section of code is problematic for any reason, you ought to be working out the kinks in the console window where you can quickly make changes and see the results. Second, Acrobat displays all unhandled exceptions in the console window. So if there is a problem, always look in the console window first to see if an exception has been reported.
Third, you can add trace statements to your code that will display in the console window. This is the number-one way to isolate a problem. Pepper the code with trace statements and then watch them print in the console window as the code runs.
This line of code, when run, will print the words “this is a trace statement” in the console window. This is a trace statement, and placing lines like this one in various locations in your script will allow you to find the exact piece of problem code. A trace statement can print out a simple string so you know the code ran to at least that place, or it can print out a value being calculated by the script.
Either way, this is the most powerful tool in your debug toolset. Our job is to narrow the problem to the smallest piece of code possible. There are several different techniques that can be used separately or combined. To see an example of this in action, I wrote an article that walks through a debug session on a single piece of code that contains several common errors called Why doesn’t my script work?
But here, I’ll discuss each technique separately. Technique 1: Look in the console window. Always do this first when something goes wrong. If Acrobat is throwing an unhandled exception, it will appear here. The exception message may provide an exact code location and information that makes the bug obvious.
If the preferences are set up correctly see the articles on the console window , all exceptions will be displayed. Be careful though–handled exceptions can flood the console window with meaningless errors.
Only display all exceptions when you are looking for something specific. Technique 2: Examine intermediate steps. This is the most general-purpose technique and can be used in many different ways. The basic idea is to place trace statements at key locations within the code so you can see the operation of the code in real time. If a value is being calculated, then use the trace statements to display the intermediate values. If conditional statements or loops are used in the code, then place the trace statements to indicate which path the code takes.
You can even write special conditional debug code that displays traces only under certain conditions. These trace messages will give you an inside look at how the code is actually working and usually allow you to quickly find the location of a bug. The code can be run line by line or in groups. The conditions on loops and “ifs” can be tested separately from the contents, and test conditions can be varied quickly and easily.
This is especially important for developing a complex algorithm, or a piece of code such as a regular expression. Technique: 4: Isolate code segments on a test document. If the script depends on Acrobat or form events, then it cannot be isolated in the console.
This technique isolates the code from events, scripts or other bugs in the main working PDF or script that may interfere with debug. It focuses your effort on the problem-at-hand and removes any misleading distractions. Technique: 5: Block out code segments. Some errors can cause problems that can’t be easily isolated by the techniques already discussed. A bug might close a document, lock up Acrobat, flood the console window with endless messages, do nothing at all, or even cause a crash.
In these cases, the problem can be isolated by commenting out code so it is not executed. Start by commenting out code from the bottom of the script a few lines at a time. Place a trace statement above the start of the comment so there is an indication the last line of active code was reached. Repeat the process of moving the top of the commented section and re-running the code to isolate the line on which the really bad error occurs.
Figure 1. Blocking out code is an effective method for finding a fatal error. For nested blocks of code, it is necessary to use a combination of line and block comments to both maintain structure and remove potential problems. There are many kinds of coding errors that are repeated over and over, even by expert programmers. None of us are immune. The first two items on the list are arguably the most common and most important.
For the most part, these are Core JavaScript issues. These items go back to my earlier statement about rules. Bug 1: JavaScript is case sensitive, so one of the rules is that keywords must be spelled exactly as defined in the Core JavaScript Reference, including upper and lower case letters. You also can’t use keywords for anything other than the use for which they are defined. And in general, any name defined in one place must exactly match all the other places where that name is used.
The JavaScript debugger in Acrobat lets you adobe acrobat x pro javascript debugger free download your code line by line, set breakpoints, and inspect debugfer using the debugger dialog. You can use the Document JavaScript dialog box to add, edit, or fownload scripts in your current document. You can associate a particular JavaScript to a specific document action. When the action is triggered, the script executes. Based on JavaScript version 1. You can tie Acrobat JavaScript code to a specific PDF document, a page, field, or button within that document, or a field or button within the PDF file, смотрите подробнее even to a user action.
JavaScript is useful for XML forms. JavaScript enables automated forms handling, Web and database communication, commenting, and user-interface capabilities. For more information, see Developing Acrobat applications using JavaScript.
Legal Notices Online Privacy Policy. Add debug JavaScript Search. Adobe Acrobat User Guide. Select an aceobat Select an article:. Adobe acrobat x pro javascript debugger free download JavaScript debugger.
Manage Document JavaScript. JavaScript Editor. You can use the JavaScript Editor to create and edit scripts. Document actions and Downloda. Select an action and then click Edit to add the script to the action.
The Console Window is the best of the bunch. The other tools are very useful and have much better performance and stability in Acrobat XI than in previous versions. However, the Console Window remains many times faster and easier to use than the other tools, dowwnload well as being error free. The Console Window is a multi-purpose and somewhat generic tool. It is the default location where JavaScript error messages are displayed as well as being an entry window avrobat testing and debugging Http://replace.me/15906.txt JavaScript code.
It can also be used to execute code snippets to automate tasks in Acrobat and to analyze documents. It does not do everything needed to debug adobe acrobat x pro javascript debugger free download, but it does provide a quick and easy way to perform most of the code development tasks you’ll ever need to do. In this article, we’ll cover setting up and using this essential tool.
Note: Special instructions for using the Console Window with Reader are provided at the end of the article. If this is your first time using the Console Window, you will need to enable and configure it from Acrobat’s Preferences settings. Depending on your platform, dowload one of the following methods to open the Preferences dialog Figure 1.
In Preferences, select the JavaScript adobe acrobat x pro javascript debugger free download. These are the two most important preference settings. In fact, both of these settings may already be checked. JavaScript is turned on by default, and Acrobat will automatically ask you if you want to turn on the Console Window if you attempt to use it.
It is not a good idea to check Enable JavaScript debugger after Acrobat is restarted, except in two situations. First, you can enable it temporarily in order to change the “Exception” options.
I prefer the options as they are shown in Figure 1, but uncheck this option before exiting the preferences. The reason for not enabling the debugger is because it has a significant negative impact on Acrobat performance, and can debygger cause Acrobat to crash. So the only reason you would actually turn on the debugger is if you needed to use the debugging tools. If you don’t already know how to use software acrboat tools, you are much better off sticking to the Console Window.
A very useful feature is the external JavaScript editor, since the default Acrobat editor is very basic. A good JavaScript javascrit will have advanced features that make code manipulation and navigation easier when you are editing document code.
You won’t be using the JavaScript editor with the Console Window, but this group of settings has an interesting effect on it. The Acrobat editor font and size settings are the same settings used in the Console Window. You can see in Figure 1 that I have chosen to use an external editor. This selection disables the Acrobat editor and grays out the font and size settings.
However, these acroobat still the settings used by the Console Window. If you want to change them you’ll need to temporarily enable the Acrobat editor to modify the settings, then reselect the external editor. In order for the settings to take affect you’ll need to close and reopen the Console Window. After these bluetooth driver download for windows 10 64 bit have been set Figure 1you’re ready to start using the Console Window.
The shortcut key can be a bit tricky on the Macintosh because there are slight differences between the keyboards on laptop and desktop systems. So the keyboard shortcut adobs not always valid, but the нажмите чтобы увидеть больше button will always work. The tool panels are a new feature introduced in Acrobat X, so displaying the Console in earlier versions is slightly different.
The Shortcut key is the same, but instead of a tool button, these earlier versions use a menu item. The Console Window section of the Debugger is in the bottom portion of the dialog, in the area labeled View.
In Figure 3, the View pull-down selection list is set to Console, meaning the Console Window is being shown. This area is also used to show the Script window for displaying runtime code when the debugger tools are enabled.
In the figure, the Console is being shown immediately after Acrobat was started. The status messages are displayed by code built-into Acrobat and loaded on startup. Each line represents a JavaScript module loaded denugger Acrobat. If there were any problems with these modules, or any others that Acrobat loads, error messages would also be displayed debugged.
Normally, we’re not interested in these initial messages. So if you would like to try out some of adobe acrobat x pro javascript debugger free download code presented here as examples, then clear the window by pressing the button that looks like a garbage can in the lower right corner of the window. Now adobe acrobat x pro javascript debugger free download have a clean work area and are set up and ready to start using the Console Window.
JavaScript code can be executed directly from the Console Window. This ability is a huge time saver since it provides a fast and easy way to test out code before it’s placed into a scripting location where it will be more difficult to debug. To run the code, make sure the cursor is on the same line as the text. You can place it anywhere on the line as long as nothing is selected.
Either of the two following actions will cause Acrobat to run the code. Acrobat always attempts to convert the result of an execution into text so that it can be displayed. Sometimes the result of adobe acrobat x pro javascript debugger free download operation is not as clean or obvious as a number. Let’s try something that doesn’t have such a well-defined adobe acrobat x pro javascript debugger free download.
Enter the following line in the Console Window and run it:. This calculation has an obvious mathematical error, but Acrobat JavaScript doesn’t display an error message. Instead, as shown in Figure 5it displays the word “Infinity.
It is much easier to find this kind of issue by executing individual lines in the Console Window where you can see the results immediately, than it is to debug it from a field-calculation script. The next line of example code is something that might be used in a читать полностью script. It assigns a simple addition to a variable named ‘sum’. As shown in Figure 6, the return value from this line of code is “undefined.
The calculation is executed and applied to the declared variable, sum. However, the first and primary operation on the line is the variable declaration, so this is the operation that returns a value to the Console Window.
Unfortunately, variable declarations do not return a value. To overcome this small issue, the Console widow displays “undefined. Anything that doesn’t exist to the JavaScript environment is “undefined. This action executes just the selected text. Dowmload technique of selecting parts of the code for execution is also useful for executing multiple lines of code.
So far we’ve talked about executing code in the Console Window for testing and debugging, but there is no adobe acrobat x pro javascript debugger free download to restrict our usage to this limited theme.
Immediate Mode means that anything entered into this window is executed directly by the JavaScript engine. We can use it anytime we want to execute code for any purpose. Two uses for the Console Window besides code testing that immediately come to mind are automation and analysis. There are several functions in Javasfript for manipulating and for acquiring information from PDFs and Acrobat. For operations with a user interface button or menu item, the main advantage of using JavaScript is greater flexibility, since JavaScript functions typically provide more options than the user interface equivalent.
For example, suppose you wanted to know the exact border color of a text field so you could use the same color in another location. Assuming the current document has a field with the correct name on it, the following code displays the raw color value in the Console Window:. The result of this operation is a color array. Remember, Frer attempts to convert all results into text. Arrays are converted to text by converting each individual array element into a text string, so the result would look something like the following line when it is displayed in the Console Window.
This is an example of document analysis with JavaScript. We’ve just found out something that would acrobar taken us just a little more effort to find out using the Acrobat property dialogs, and the information is in a very usable format. We can adobe acrobat x pro javascript debugger free download copy and paste this information to accomplish some other purpose, for example applying the color to another field with this line of code:.
Suppose a document needs to be checked for branding purposes, i. The following code uses a simple loop to display this color info in the Console Window for manual inspection:. Because of the loop, this code cannot be executed one line at a time. It has to be done all at once.
Notice that in the взято отсюда there is a function called console. It’s in the fourth line. This function writes text to the Console Window and it will be dehugger in the next section.
Here’s an example of a function that does not have an easy equivalent on the regular Acrobat menus and toolbars. Enter the following line into the Console Adobe acrobat x pro javascript debugger free download and run it:.
Acrobat will create a new, blank PDF document. Перейти is perfect for trying out new ideas before applying them to a working document. The results of this operation are shown in Figure 7 below. Note that yet again, the result is something different. The result shown in Figure 7 tells us the type of object created. This result doanload only useful in letting us know the function worked.
If app. Both of these situations would have been displayed in the Console Window. The path property is exactly what you might think it should be.
It demonstrates using menu items and trusted functions in an automation script. Find Required Fields Have a large form and need to figure out which fields are already marked as Required?
This tool finds and lists all required fields in a popup menu. Selecting a menu item places the keyboard focus on that field. A Great tool for any form developer. Good for fixing up scanned PDFs. Based on JavaScript version 1. You can tie Acrobat JavaScript code to a specific PDF document, a page, field, or button within that document, or a field or button within the PDF file, and even to a user action.
JavaScript is useful for XML forms. JavaScript enables automated forms handling, Web and database communication, commenting, and user-interface capabilities.
For more information, see Developing Acrobat applications using JavaScript. Legal Notices Online Privacy Policy. Repeat the process of moving the top of the commented section and re-running the code to isolate the line on which the really bad error occurs.
Figure 1. Blocking out code is an effective method for finding a fatal error. For nested blocks of code, it is necessary to use a combination of line and block comments to both maintain structure and remove potential problems. There are many kinds of coding errors that are repeated over and over, even by expert programmers. None of us are immune. The first two items on the list are arguably the most common and most important. For the most part, these are Core JavaScript issues.
These items go back to my earlier statement about rules. Bug 1: JavaScript is case sensitive, so one of the rules is that keywords must be spelled exactly as defined in the Core JavaScript Reference, including upper and lower case letters.
You also can’t use keywords for anything other than the use for which they are defined. And in general, any name defined in one place must exactly match all the other places where that name is used. Bug 2: In all programming languages, punctuation has special meaning and must be used in a very specific way. I once had an argument with a client over this line of code:. She asserted that according to the rules of English, the semicolon at the end of the sentence needed to be inside the quotes, i.
To begin with, this is not a sentence, it’s a text string, and secondly, it’s not English, it’s programming. The rules we follow are the rules laid out by the Core JavaScript Reference. The quotes are used to delimit a text string. There must be one at the beginning of the string and a matching quote at the end of the string. This actually happens to be one of the most common punctuation errors.
It is caused by copying code from an e-mail message or word processor. Be very careful when copying code from a source that is not strictly plain text. Finally, the semicolon terminates the line of code. A misuse of any of these punctuation characters could easily result in a bug. These characters are used to delimit nested entities, both code and data. It’s very common when writing complex or long code to mismatch a bracket or quote, which will always result in a bug.
This is the assignment operator. There are other examples, but in general, if your code looks right, but doesn’t work and doesn’t throw an obvious error, it’s possible you have an improper operator. Look closely and check the reference for the proper meaning of the operators you are using.
Bug 4: Bad names, or name paths, are very common with form scripting. In form scripting, each form field is named. It is critical that when used in a script, fields are properly referenced and spelled. Bug 5: Another common form bug is invalid data. Empty fields can return a null value and calculations can result in non-numbers, such as infinity, or even text strings.
A bad value in one place can cascade into other parts of the form where it’s used in a calculation. To isolate this kind of error, you have to trace backward to find the original bad value. To fix it, you need to take steps to ensure the bad value is not propagated.
For example, set the initial value of the field to 0, or write code to test calculation results for unacceptable values.
Bug 6: The last item on the common bug list, thrown exceptions, is not a bug in the same sense as the others listed. Obviously, there is a bug causing the exception to be thrown and it needs to be fixed. But the point here is that when a script throws an exception, the code execution stops at that point. Exceptions cause Acrobat to abort operation. To the user and the novice scripter, it may appear that one or more operations not related to the real problem are not working.
Without digging deeper and isolating the real problem, the exception can be misleading. Which brings us back to the original point: Do not make assumptions based on the surface behavior of the form. Check the console window first and then use one of the other debug techniques discussed above to dig deeper. Use your knowledge of scripting and the references to isolate the source of the real error.
Try Acrobat DC. Learn how to edit PDF. Get started. Using Acrobat JavaScript with forms. Automating redaction with Acrobat JavaScript and Acrobat 9. Rearrange PDF pages. Create PDF online. Convert Word to PDF online.