introduction
an interactive PDF, we need the appropriate software. Adobe has here a convenient software called Adobe LiveCycle Designer . This is easy to use and intuitive, but the JavaScript Editor is some getting used to.
In Adobe LiveCycle Designer can import an existing PDF and then put it in a form with various functions. To add
functions or fields we select on the right side under the Library item and move it by dragging it to our PDF. This element, we can call later and put on the right side under Object various settings. Here it is possible the type, format, position, position, default value, name and set validation options. to open the Java Script Editor
To Java Script Editor we go in the taskbar on Window on Script Editor. (CTRL + Shift + F5) the script editor is now open. This is probably empty and grayed out. In the title bar, we can select various options. In show can you can display each element of the desired event. fn displays various functions available. In Language, you can choose between JavaScript and FormCalc. FormCalc is somewhat reminiscent of the formulas as we know it from Excel. The last one can still choose whether the script to run the client side or server side.
In order to program something We now choose from a field. Then we let in "Show" View All Events ". We will now see all available methods. Apply details on the most important methods
Java Script - Part 1
variable create
To display code proposals we click on fn. After each point we write the proposals will be displayed automatically.
First we create a variable in which we store a string, this string we give later in a string of messageBox again. The code provides as follows from this: var output =
initialize the variable var, then comes the name of the variable, which is then assigned a value. We take this value from a text field on the PDF. For this we need to specify the "path" to this field. At the end of this path is the field name. We read with RawValue then finally the content of this field.
Message Box
the value of the above variables, we now give a message box from:
For more information on the various parameters You can read further here:
Adobe - messageBox
Other Java Script methods can be found here: use Java Script - Part 2
FormCalc apply
FormCalc is similar to Excel and is recommended for simple calculations in the PDF. In Language we change the language to FormCalc. Do we want to do this only for a function, we can do this by right clicking - do FormCalc.
calculations we always do in the event calculate . We just click the title bar fn , and choose from our required method.
Sun summed it as different numbers or fields together.
0 comments:
Post a Comment