Using Document-Specific Processing Rules
In this tutorial, we'll look at how to use a set of document-specific rules to affect a split operation. Instead of following a standard splitting configuration, these rules are used to apply processing settings based on the input document’s text. A text search (or pattern) is associated with a unique splitting profile. If the first page of the input document contains the relevant text, the corresponding splitting profile is used to process the file. Only the first matching rule is used for processing, and the rules search only the first page of the document. If none of the rules are matching the document, then the main splitting profile is used for processing.
This feature allows you to use different splitting profiles for different kinds of documents. For example, invoices can be split using one set of settings, while account statements use another.
What is a Splitting Profile?
A splitting profile is a settings file with an *.apr file extension. It contains a complete set of settings for splitting PDF documents. You can create settings files by pressing the "Save Profile..." button located on the "Split Settings" dialog.
Input Document Description
In this example, we’ll demonstrate how to use different splitting profiles to process two different kinds of documents - invoices and account statements. The steps below will outline how to create and save two separate splitting profiles, and use them to create a set of processing rules. We will then run a split operation with these rules applied on an input file containing invoices. An "invoice" rule will be executed, as the first page contains this text:
We will then test the same rules on an input document containing account statements, so that a different "account statement" rule is used:
You need a copy of Adobe Acrobat along with the AutoSplit™ plug-in installed on your computer in order to use this tutorial. Both are available as trial versions.
Step 1 - Open the “Split Document Settings” Menu
With the file to be processed open in Acrobat®, select “Plug-ins > Split Documents > Split Document…” from the main Acrobat® menu to open the “Split Document Settings” dialog.
Step 2 - Create and Save Splitting Profiles
The first step is to create the splitting profiles used to split each document type. Use the "Split Settings" dialog to create and test a splitting profile for processing invoices. Using these settings, split invoices will be placed in "C:\Documents\Invoices Output\", and named "Invoice_" followed by the invoice number located in each document.
Press "Save Profile..." to save it.
Name the file and select a folder, then press "Save". Settings profiles will be saved with an *.apr extension ("Invoices.apr").
Now create and test a splitting profile for processing account statements, and save it. This profile will name split statements using "Statement_" followed by the client name located within each document, and save them in "C:\Documents\Statements Output\".
Save the second settings file ("Statements.apr").
Repeat these steps for each additional document type you want to process. Once finished, you should have one *.apr file for each document type.
Step 3 - Edit Document-Specific Settings
Now create a master splitting profile that will be used to split all document types. This will be used if no rules match the first page of the input document.
Check "Use document-specific settings:" under "Pre-processing Options", then press "Edit..." next to it.
Step 4 - Add a Document-Specific Rule
Use this dialog to create a set of document-specific rules that associate text patterns and corresponding settings profiles.
Begin by pressing "Add Rule...".
Step 5 - Configure the Text Search
Enter text (or a search expression) to search for in the "Find what:" box. This rule will be triggered if the first page of the document contains the word "invoice".
Note that you can search for a fixed text string, or for a pattern by using regular expression syntax (press "Help..." and see the "Regular Expression Syntax" section).
Press "OK" to proceed.
Step 6 - Select the Corresponding Settings Profile
Locate and select the "Invoices.apr" settings file, then press "Open".
Step 7 - Add a Second Rule
The search rule has been added. Press "Add Rule..." to add another.
This rule will search for the words "account statement". Press "OK" to proceed.
Select the corresponding settings file and press "Open".
Step 8 - Save Rules
Now you will have one rule for every document type. Press "OK" to close the "Document-Specific Rules" dialog.
First, we'll run the split procedure on the document containing invoices. As it contains the word "invoice" in the first page, the "invoice" rule and associated settings will be used for the split.
Step 9 - Execute the Split
Finish configuring the master splitting profile. This could be used to apply a pre-processing script (if this option is selected). The master profile would be used to split documents that do not match any of the document-specific rules.
Press "OK” to confirm the split.
Press "OK" again.
Step 10 - Inspect the Results
After processing, the “AutoSplit Results” dialog appears on the screen listing the files that have been created. The invoices have been split and placed in an output folder according to the assiged "Invoices.apr" settings file.
Press “Open Output Folder” to inspect them.
If the same settings are used to split a document containing account statements, the corresponding rule will be used. In this example, "account statement" is identified in the first page of the input:
After processing, the statements have been split and placed in an output folder according to the assigned "Statements.apr" settings file. Press “Open Output Folder” to inspect them.
Depending on the input file's content, the split output was placed into two different folders according to the two rules used:
You can find more AutoSplit tutorials here.