When Profiles are not enough: Process Plans

When you look at the Profile window, you'll see that the list of Profiles contains two different types of items.

  1. Regular Profiles, recognizable by their blue icons.
  2. Process Plans, recognizable by their yellow icons.

Process Plans behave like Profiles in most ways. They can be run on PDF documents, you can import and export them. But Process Plans are built differently and they can be used to solve different problems.

Why Process Plans?

Process plans were invented to solve two very distinct problems:

  • In a Profile you can have Checks and Fixups, but you cannot control the order in which these are executed. For Checks that is not a problem, Checks do not change the PDF document they are run on so their order is irrelevant. But for Fixups this can be a real problem. Sometimes you need to do things in a certain order.
  • Sometimes you need to be a little careful when you execute a Fixup; you really only want to perform a fix if a certain condition is met.

Process plans make both of these things possible; you can control the order of execution and you can do conditional processing based on the result of a Check or Profile.

Anatomy of a Process plan

Users get a visual editor in which the steps can be clearly arranged and linked. The figure shows the editor "Edit Process Plan":

Area at the top: Basic information on the Process Plan

1. Field for naming the Process Plan (appears later in the "Profiles" window).

2. Button for adding a variable to the name of the Process Plan.

3. Button for locking or unlocking the Process Plan.

4. Pop-up menu: Here you can store metadata on the author of the Process plan including e-mail, password and description. This description is then displayed in the "Profiles" window and helps to communicate the purpose of the Process Plan.

The horizontal bar below: Editing and View Modes

5. Undo / Restore / (Delete connection, not visible in this view).

6. Reduce view / Reset zoom / Enlarge view / Adjust view to window.

7. Show or hide connection info.

8. Enable or disable automatic alignment to the grid.

9. Generate layout automatically (Note: The auto-generated layout can be undone using the Undo arrow in the top right corner (5)).

Vertical area on the right: List of elements that can be included in Process plans

10. Repertoire of sequence steps from a Process plan: Profile, Check, Fixup, Process Plan,  Action, Quick Check, Quick Fix, Variable, File pick up, Rename PDF, Create PDF copy, Add files, Compare PDFs.

Main field in the middle: Area for arranging sequences

11. Example of a sequence step.

12. Example for connection type.

Horizontal area below: Completing the set-up Process plan

13. Check the usage (where this Process Plan is used) using the 'Usage' button.

14. Before saving, you can Check the Process Plan in practice by clicking on the "Test" button. More about the test mode in pdfToolbox can be found in the chapter "How to use the test mode".

15. A Process Plan that is not yet finished can be saved.

16. All the JavaScripts used in a Process Plan can be edited at the same time in Visual Studio Code. The "Edit Scripts" button is only displayed, if the Visual Studio Code command line tools are installed. Learn more here.

17. "Cancel" editing.

18. Press "OK" to save the Process Plan.

 

Process plans before pdfToolbox 11

We introduced the NextGenUI Process plans in pdfToolbox 11. While the usage is the same as before, the UI looks totally different from the previous one. Below is the Process Plan editor before pdfToolbox 11:

  1. Process plans of course have a name and description, just as Profiles.
  2. This area at the top details what you can use as the steps in a Process Plans. Profiles, Checks and Fixups are described in this manual, actions and variables go beyond the scope of this manual but are described elsewhere in the online help.
  3. The first step in this Process Plan is always executed; in this example that is a Profile. Notice the up and down arrows to allow changing the order of the steps in the Process Plan. This allows determining what exactly the order is going to be of all of the steps in the Process Plan.
    The "On Error", "On Warning", ... options allow you to specify what needs to happen based on the result of this first step. This could simply be executing the next step, but the options can also be used to jump to a specific step in the Process Plan or exit the sequence altogether.
  4. This second step is an action, which was created in the Switchboard and which will re-distill the file.
  5. The last step in this example is the same as the first step. This is to re-execute the same Profile if the first step wasn't successful and thus the re-distill action was used.

How is a Process plan structured?

Process plans always have a start point, at least one sequence step and one end point.

Between start and end, sequence steps from the repertoire can be placed from the right-hand side. Sequence steps are possible in the following categories:

  • Process plan
  • Profile
  • Check
  • Fixup
  • Action
  • Quick Check
  • Quick Fix
  • Variable
  • File pick-up
  • Rename PDF
  • Create a PDF copy
  • Add Files
  • Compare PDFs

Set up Sequence steps

If you click on a placed sequence step, a pop-up menu is displayed on the right side, in which all Profiles / Checks / Fixups / etc. available in pdfToolbox can be selected - in each case suitable for the type of sequence step.

  1. Since pdfToolbox 14 there is a page selector for Profiles, Fixups and Checks. Either a predefined option "all, equal or unequal" can be selected, or you apply a page selector expression. Further information can be found here in the article Page selector and Split scheme. If a page selector is defined, only pages referenced from the page selector will be executed by the sequence step.
  2. Since pdfToolbox 14, a severity for a Check can be specified (Info, Error, Warning or a variable) which defines how a hit should be reported.
  3. The "Fast VDP mode" checkbox only works for files representing variable data. Is it activated, XObjects are processed only once ignoring context.  Read this article for further information.
  4. A Sequence step can be activated or deactivated via the control field "Enable step". Deactivation is useful in cases where a step is to be skipped.

Connecting Sequence Steps

Sequence steps have four nodes that can be used to connect individual steps. To do this, click on the area of the initial step and lead the displayed connecting line to the desired next step.

Connection type

  1. If you click on a connection line, you can use the Checkboxes displayed on the right-hand side to specify the conditions under which a subsequent and connected step is to be triggered (not all connection types mentioned here will necessarily be visible, as they are context-dependent):
    • On success
    • On failure
    • On hit
    • On success
    • If disable
  2. You can also create a report in postprocessing, whereby the report type can be set (for example XML, Text, JSON or PDF report) . This option is only available for certain sequence types.

Add a new sequence step

Adding a new sequence step to a process plan is done by drag and drop. The required sequence step is selected from the right column and then dragged to the desired position in the process plan. When the connection line lights up blue, the step can be added.