Merge PDF Files
The Merge PDF Files Input task (previously named "Concatenate PDF Files") captures all PDF files in a given folder and merges them into a single PDF file.
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
This task captures all of the PDF files present in a specific folder, in one operation.
The Merge PDF Files Input task performs just like any other input: once the process has completed, control is transferred back to the input one last time to check if new files meeting the mask have come in. This means that the merging of PDF files that are not all present at the start of the process may take several passes, which may have an adverse effect on the overall performance and the size of the resulting PDF.
Processing
Once all PDF files are captured, their original copies are deleted from the input folder (or tagged as Archive if this option is selected) and they are merged into a single PDF. This is done in a single operation, not incrementally, meaning the file is built once and, if the option is chosen, optimized once.
Output
A single PDF containing as many pages as all the combined input PDFs is generated. If the option is selected, this PDF is optimized. An optional metadata file is also created, containing information about the PDFs. This metadata is divided such that each PDF file is its own document, which can contain multiple data pages.
General tab
- Folder: Enter the full path of the folder from which the input files are to be taken.
- Masks: Enter a single or multiple file names or use file name masks. See Masks. Since this task only supports PDF files, make sure your extension remains .PDF for all your masks.
- Sort files by: Select a given sorting method to prompt PReS™ Workflow to sort the files in the source folder before taking them (and thus to take them in a specific order). Select None to let PReS™ Workflow take the files without sorting them first.
- Sort order: If you selected a sorting method in the Sort files by box, select the order in which you want the files to be sorted.
- Use archive attribute: Select to turn on the archive attribute of the data files found in the source folder and to leave them in their original location (i.e. to take copies of the source files). Note that PReS™ Workflow never takes source files that have their archive attribute turned on (so the source files will not be taken again and again). When this option is turned off, PReS™ Workflow removes data files from the source location.
- Capture files in sub-directories also: Select to capture files from child folders of the source folder as well. When this option is selected, the chosen Sort order is applied to each separate folder, not across folders. The subfolders themselves are always processed in alphabetical order, regardless of the sort order.
- Sort directories first: If you selected a sorting method in the Sort files by box, and if you want the folders present in the source folder to be sorted first, select this option.
- 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 PReS™ Workflow to handle.
- Create Metadata: Select to specify that a basic metadata structure should be created for the resulting PDF file. The metadata structure created will contain a single Job separated by one Document per captured PDF file. Within each Document, one Data Page containing a single Page is created for each page of the PDF file.
Metadata can be manipulated with the Metadata Tasks, see Metadata Tasks.
"Other" Tab
- Job Information group
- Information elements: indicates what job infos are automatically created by the input task.
- Add lines before first data page: Using the arrows keys you can add any job information directly at the beginning of your data file.
- Backup input files: Check this to save a copy of each data file that is captured by your input. These files are saved in the PlanetPress Suite Workflow Tools working folders under the "Backup" folder.
- Backup filename: Enter the filename that you wish the input data file backup to be saved under.
- Delete Existing Metadata: Check to remove any metadata from memory. This option is disabled on initial input tasks, and is checked by default on secondary input tasks.
Job Information definitions
- %1 - PDF Directory: Contains the folder from which the data was captured.
Examples & Use Cases
This task is put into effect in the following use cases and example processes:
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.