Splitting example #2
Split documents and create output files depending on the number of pages.
- Create a workflow with the AutoCapture and Barcode components.
- On the General tab of the Barcode component configuration dialog box, select the Split on barcode check box, and select External Script in the Using box.
- Click the Scripts button, click Add, and enter a file name with the .vbs extension.
-
Click the Edit button, and in the Script Editor window create the following script:
RRV="OutputPages=1..5" If sPagesCount = sSplitValue Then RRV="OutputPages=2,4;1" End If
- Click Compile, save the script, and close the Script Editor.
- In the Script Properties dialog box, select Each document as Run condition.
-
In Script Variables,
click the Add button to configure the script variables:
Variable Description sPagesCount Local variable initialized by the ~LTB::PagesCount~ RRT. sSplitValue Local variable initialized by the value 7. - Save the configuration and run the process.
This script is executed for the entire document when all pages are processed.
If a document contains 7 pages, the Barcode component creates two documents, one with two pages
(pages 2 and 4 of the original document) and a second with one page (the first page of the original document).
If the page count is not equal to 7, the component creates one output document that contain pages 1 to 5 from the original document.