-pdfScript
Specify an alternative script insertion file for fillable PDF.
Syntax
-pdfScript
yourPDFScript.js
Description
This lets you provide your own JavaScript file for insertion into Fillable PDFs. That is as opposed to the default file: DOPDFScript.js
that is installed in .../DO/Bin
.
Obviously, this applies only when you are generating fillable PDF output.
The big bonus here is that you can include generic JavaScript functions for use in your PDF Viewer scripts. That is, as referenced by your form object's PDF Input event, or by your input field attributes.
No doubt you will copy the standard .../DO/Bin/DOPDFScript.js
, likely to your Overrides folder, say as
.../User/Overrides/PDFScript.js
. Edit it. Then in your Merge command line, or in your Merge.prm
file you could code the option as follows:
-pdfScript
$O/PDFScript.js
That file contains DocOrigin functions as well, so do be careful not to alter them, but feel free to add functions outside of the DocOrigin object. Do note that the file extension is .js
, not .wjs
. It is plain JavaScript, without any DocOrigin extensions. You should probably reference Adobe's PDF API manual a lot. A link to it is found on the Fillable Forms page.