Imposition configuration editing and debugging
To edit imposition configurations, go to the "Impose" section of the Switchboard (as explained in this article). The sheet configurations and runlist can be found in the "Sheet configuration" and "Imposition scheme" menus.
Managing imposition configurations
The lists mentioned above contain all old-style and JavaScript configuration files. The configuration menu at the right of each menu allows managing these configuration files.
- "New", allows creation of a new runlist or sheet configuration. Both old-style and JavaScript configuration files can be created here; the choice is made in the editor that appears after "New" is clicked.
- "Edit", opens the selected configuration file in the relevant editor.
- "Duplicate", creates a copy of the selected configuration file and opens it in the relevant editor.
- "Delete", confirms and then deletes the selected configuration file.
- "Import...", imports a configuration file from disk.
- "Import from Library...", imports a configuration file from a different library. A dialog window appears where the library and then the configuration file from that library can be selected.
The sheet configuration editor
Select an existing sheet configuration, and use the "Edit" menu item to open it in the Sheet Configuration editor. If your library doesn't contain sheet configurations, you may need to switch to one of the standard libraries.
Sheet configurations always use old-style syntax, which is a tab-based textual format (not JavaScript). The details of the sheet configuration format are described here.
- You can set or change the name of the sheet configuration.
- The "Usage..." button brings up a dialog window that displays all actions that use this sheet configurations.
- The "Settings..." button brings up a dialog that shows all sheet templates available in the current library and allows selecting a template.
The runlist editor
Select an existing runlist (from the menu under "Imposition scheme", and use the "Edit" menu item to open it in the runlist editor. If your library doesn't contain runlists, you may need to switch to one of the standard libraries.
The runlist editor uses either old-style syntax (further described here), or JavaScript (further described starting here). Additional features of the editor are explained in those chapters where relevant, but for both formats a few things can already be noted:
- Give your runlist a clear name. This is used in the Switchboard menu, but also if you later use the runlist in an "Impose" action. And it is the name used in the file system for the ".runlist" file.
- At the top of the editor, you can switch between the old-style and JavaScript format.
- Regardless of the type of runlist, the editor supports syntax coloring, code completion, and error indications in case of problems with the runlist.
- The "Usage..." button brings up a dialog window that displays all actions that use this runlist.
- The "Settings..." button brings up a dialog window that shows additional filter settings. These determine when your runlist is shown in the Switchboard "Impose" panel (you can indicate that your runlist is only valid for certain sheet sizes or for a certain number of pages per imposed sheet).
- The sheet configuration menu shows all sheet configurations in the current library. Selecting the proper sheet configuration is here only relevant if you are going to use test mode.
- The "Test" button brings up the test mode dialog window, and runs your imposition. Test mode allows seeing the variables created during imposition, the imposed result etc...
- The "Save" button saves your runlist to the current library without closing the editor.
Debugging JavaScript imposition scripts
Because JavaScript imposition configurations can become quite complex, there are tools available to make your life easier. To use them, enable the "Show evaluation results" checkbox.
This functionality is only available for JavaScript imposition runlists, and only from pdfToolbox 16 onwards.
On the right hand side of the dialog window appear two new views:
-
Runlist debugger
The runlist debugger uses the sheet configuration and test file specified at the bottom of the dialog window, runs the imposition script, and then shows the created sheet definitions, sheets, slots etc as JavaScript objects on the right hand side. -
Console log
The console log tab shows the JavaScript console. To use it, in your script use one of the JavaScript console functions such as console.log or console.info (look here for console documentation).