Working with ask-at-runtime templates

The default template for the ask-at-runtime dialog window is embedded in the pdfToolbox Desktop executable and shouldn't be modified. While this article doesn't cover editing templates, it does describe how to select them, create a new one to start modifications from or find the templates to edit them.

Selecting a template to use

Checks or fixups always use the default template. When creating a profile, it is possible to select the profile that will be used. Look for the Dialog property under the general profile properties (Labeled (1) in the window shown below).

Available templates

Opening the "Dialog" pull-down menu reveals the following choices:

 

  1. Select "Default" to use the default pdfToolbox Desktop profile for this profile.
  2. This section displays the currently available templates and lets you choose any of these templates for this profile.
  3. "Open folder with configuration files" opens the folder where the current templates (see (2)) are stored. Use this to edit a template or to create a copy.
  4. "New..." creates a new template. The template will be a copy of the default pdfToolbox Desktop template. You will be able to find it in the folder with configuration files (see option (3)).

Debugging a template

It is possible to connect the Chrome debugger to a running instance of the ask-at-runtime dialog window. In order to do so, you need to install an additional JSON file in the pdfToolbox Desktop preferences folder first. Locate the "Settings" folder in the pdfToolbox preferences folder.

The preferences folder can be found here:

  • On Mac: /Users/<USERNAME>/Library/Preferences/callas software/callas pdfToolbox <VERSION>
  • On Windows: C:\Users\<USERNAME>\AppData\Roaming\callas software\callas pdfToolbox <VERSION>

In this settings folder, copy the attached JSON file:

Make sure the file is called "extras.json" and is placed inside the "Settings" folder. After installing it, restart pdfToolbox Desktop if it was running. Then open an ask-at-runtime dialog window and with it open, switch to Google Chrome. In Chrome, surf to:

http://localhost:8080

The port number can be modified in the "extras.json" file if desired.

Doing this connects the Chrome debugger to the running ask-at-runtime dialog window. Making changes to the CSS will now be reflected in the ask-at-runtime dialog window inside of pdfToolbox Desktop in real time!

The following tutorial will show you how to customize the ask-at-runtime dialog using Html, CSS and Javascript: