It is possible to run JavaScript in print templates using <script> elements.
To do so, follow the steps below:
- Go to the Print templates menu.
- Select Download current template.
- Unzip the downloaded archive.
- Open the
.vmfile in a text editor. -
Add JavaScript in a
<script>element.These scripts must include the
window.FluidTopicsPdfCustomizationfunction. See Script structure. -
Create an archive of the template and possible assets.
- Select Upload new template in the Print templates menu.
- Select Save.
It is not possible to run JavaScript in print templates specific to personal books. It it possible to run JavaScript when the same print template is used for both documents, and personal books.
To run scripts in print templates, it is necessary for an ADMIN user to deactivate the Print templates Security toggle.