PDF Splitter
PDF Splitter action tasks are used to split emulated PDF data files into multiple data files that are passed to subsequent tasks in the process.
This feature is part of the PDF Tools, which is only available in PlanetPress Office and PlanetPress Production. It is not available with a PlanetPress Watch license.
Input
A PDF Emulation data file.
Processing
The file is separated into multiple chunks according to the rules set in the task's properties.
Output
Multiple data files, sent one after the other to the rest of the tasks in the process. Metadata, job infos and user variables are not modified by this task.
PDF Splitter action task properties are as follows:
General Tab
- Split on page group: Select to split the data file based on pages (rather than on a word found within the PDF data) and to activate the option from this group, which is used to tailor exactly how you want the page based splitting process to take place.
- Page(s) per output: Enter the number of pages to include in the file generated by the splitter in this edit box below or use the spin buttons.
Split PDF file on a word group: Select to split the data file whenever a given region is found within the PDF data file (rather than on based on pages), or whenever the regoin found at a given location changes, and to activate the options from this group, which are used to tailor exactly how you want the region based splitting process to take place. - On region content change: Select if you want the data file to be split when the word found at a given location changes.
- Get: Click to go to the Data Selector and select the location associated with the On region change option.
- Specific word: Enter the word to use as the splitting criteria. In this variable property box, you may enter static characters, variables, job information elements or any combination of these. You may also use the Get Data button to get a static string of characters from the sample data file. If you use this option, the coordinates of the data you will select will be added to the Left, Right, Top and Bottom boxes below.
- Left: Enter a value corresponding to the left coordinate on which the splitter must start searching for the region.
- Right: Enter a value corresponding to the right coordinate on which the splitter must start searching for the region.
- Top: Enter a value corresponding to the top coordinate on which the splitter must start searching for the region.
- Bottom: Enter a value corresponding to the bottom coordinate on which the splitter must start searching for the region.
- Match case: Select to force the splitter to match the character casing. Note that this setting applies both to the On region change and Specific word options. If this option is selected, “DAY” and “Day” will not be considered as matching the search string “day”.
- Trim selection: Select to force the splitter to strip empty trailing characters. When this option is not selected, blank trailing characters, if any, are considered in the matching process, so the word “DAY” will not be considered as matching the word “DAY”. Note that this setting applies only to the On region change option.
- Where to split: By default, the task splits the file at the beginning of the line on which the condition is met (the default value is 0). If you want the task to split the file a certain number of lines before or after that line, enter a value other than 0 in this box. Enter 1, for example, to split the file at the beginning of the line that precedes the line on which the condition is met.
- Before: If you entered a value other than 0 in the Where to split box, select this option if you want to split the file a given number of lines before the line on which the condition is met.
- After: If you entered a value other than 0 in the Where to split box, select this option if you want to split the file a given number of lines after the line on which the condition is met.
- When condition is found: By default, the task splits the file every time the condition is met (the default value is 1). If you want the task to split the file only when the condition has been met twice, for example, enter the number 2 in this box.
- Split PDF file based on Metadata group:
- Metadata Level: Determines on which level of the metadata the split occurs. This can be Group, Document to Data page.
- Sequencing based on:
- The following number of occurrences of the level: Determine a sequence based on the number of instances found for the metadata level currently processed. For example, if the Metadata level is set to Group, and this value is set to 3, each sequence contains 3 groups (except, possibly, the last one, depending on the number of groups left in the last sequence). The next loop starts with the next group after this sequence.
- The following number of sequences in the job: Divides the metadata into a set number of sequences and equally distributes the number of levels between the sequences. For example, it the Metadata level is set to Document, and this value is set to 5, a 100 document job file will be divided into 5 sequences of 20 documents each.
- The following rule: Determine if a new sequence starts or if the current one ends. For each metadata level, the current value of the specified metadata attribute/field is compared with the one in memory. If they are different, either a new sequence starts or the current sequence is ended. The next sequence starts with the next metadata level being processed. For details see the Rule Interface.
- Optimize resulting PDF: Select to specify whether the resulting PDF should be optimized. Optimization can lead to a significant reduction in the size of the PDF, but it may also add a certain amount of time to the process. This option should only be unchecked if the timing of the process is critical and needs to be done quickly, but keep in mind that the resulting PDF may be much larger than it should be and may even be too large for PlanetPress Workflow to handle.
- Reset Metadata according to new PDF: Metadata will be recreated according to the new PDF that was created, including page numbering, etc.
On Error Tab
By default, any action task, branch, splitter or condition that generates an error will simply be ignored, and the task just under it (not within a branch) will be given control of the job file without any modification. Any initial input task that generates an error will stop the process from running as a whole, and output tasks will not generate output. The On Error tab can be used to overwrite the default behaviors.
- Send to Process: Check this option to send the job file to an error management process.
- Error Process drop-down: Enabled only when the Send to Process option is checked. Lists any process of which the initial input task is the Input Error Bin task.
- Action Group: This group is disabled in the initial input tasks and defaults to Stop Process. In all other tasks where the On Error tab is present, the following options are available:
- Ignore: The task is ignored as if it did not exist, and the job file is passed on to the next task in the process.
- Stop Branch: If the task is in a branch of the process, the branch is stopped and the job file is returned to the process after the branch. The branch will not produce any output.
- Stop Process: The process is stopped and no more processing is done. No further output is produced.
- Log Message: Check this option to enable logging a custom error message in the PlanetPress Suite Workflow Tools' log file.
- Message: Enabled only when the Log Message option is checked. Enter a message that will be logged in the PlanetPress Suite Workflow Tools' log file. You can use any variables available in PlanetPress Workflow to customize the message.
- Store the message in variable: Select in which jobinfo, local or global variable you want to store the message content.
- ID: Enter an error ID. This ID will be visible in the Windows Event Viewer. However, the ID is not visible in the PlanetPress Suite Workflow Tools' log file.
- Store the ID in variable: Select in which jobinfo, local or global variable you want to store the error ID.
- Reset to defaults: Resets all options in this tab to their default values.
If storing the message or ID, if they are store in a jobinfo they will be available in any error handling process where errors are being forwarded. In all cases, if your process continues after the error, the contents of the variables selected in this window will be available for the rest of your process, or whenever they are overwritten.
Common Errors
Though some error messages are specific to a task in particular, others may apply to any and all tasks because they are related more to the system than to PlanetPress itself. Some examples would be W3813, W3830, W3991, W4005. These correspond to issues such as not having any space to write files, permission errors on folders or files, etc.
Comments Tab
The Comments tab, added in PlanetPress Suite 7.5, is common to all tasks. It contains a single text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button, and are displayed in The Task Comments Pane.