Your second PDF form with Scribus (and Javascript): Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
==Launching JavaScript functions== | ==Launching JavaScript functions== | ||
Go to File/Export/Save as PDF and click on the Viewer tab. Choose the JavaScript to be executed (see the drop down list). | |||
[[Image:Javascript on launch2.png]] | [[Image:Javascript on launch2.png]] | ||
Revision as of 22:19, 1 February 2008
Introduction
JavaScript functions in a PDF document
Adding new functions
Go to Edit/Javascripts... and click on Add. Choose a name for your new function and click on OK to launch the built-in JavaScript editor.
Let us call our first function RunOnLaunch and start with a simple alert that will be displayed on launching the PDF formular in Adobe Reader:
function RunOnLaunch() { app.alert('Welcome to the Scribus Demo Form!'); }
Launching JavaScript functions
Go to File/Export/Save as PDF and click on the Viewer tab. Choose the JavaScript to be executed (see the drop down list).
Adding JavaScript to PDF form elements
Validate form fields
Calculate form field values
(c)
The content of this page is available under the Creative Commons Attribution-ShareAlike Licence and Free Documentation Licence
If you alter, transform, or build upon this work, you may distribute the resulting work either under one or under both of the abovementioned licences.