SplitMultipageTiff
Creates separate images for each page in a multipage TIFF file.
Member of namespace
ConvertSyntax
bool SplitMultipageTiff ()Parameters
None.Returns
True if the file is successfully converted to a TIFF document. The action returns True for both single and multi-TIFF files.False if the current page is not a TIFF or if there is a failure in the conversion.
If the number of input files/pages exceeds the maximum allowed or if there is a failure in the conversion, the batch is set to abort.
Level
Page or Document level.
If called on a page level object, then each new single page TIF file created from the source multi-page TIF will be associated with a new DCO page object that is at the same level as the parent DCO page from which the page was created.
If called on a document level object, then each new single page TIF file will be associated with a new DCO page object that is a child page of the parent document object.
˂page "Other"˃ TM000001.tif (source page object)
˂page "Other"˃ TM000002.tif (new page object, page 1 of TM000001.tif)
˂page "Other"˃ TM000003.tif (new page object, page 2 of TM000001.tif)
˂page "Other"˃ TM000004.tif (new page object, page 3 of TM000001.tif)
˂page "Other"˃ TM000005.tif (new page object, page 4 of TM000001.tif)˂Document "Invoice"˃ TM000001.tif (source document object)
- ˂page "Other"˃ TM000002.tif (new page object, page 1 of TM000001.tif)
- ˂page "Other"˃ TM000003.tif (new page object, page 2 of TM000001.tif)
- ˂page "Other"˃ TM000004.tif (new page object, page 3 of TM000001.tif)
- ˂page "Other"˃ TM000005.tif (new page object, page 4 of TM000001.tif)If the current page image is a multi-page tiff, the variable SplitPageCount will be added on a parent DCO storing the count of pages split from the parent image. If the image is not a multi-page image,the variable SplitPageCount will not be created. This variable can be used to control rule logic using the action rrCompareNumeric or other types of evaluation. It can also be used to identify whether the parent image is a multi-page tiff or a single page tiff.
Additionally the variable original_source_image added on parent image DCO xml, set to the value "yes". The value "yes" denotes the parent image is a multi-page tiff and individual image files have been created.
Details
If the current page is a TIFF, the file will be converted to multiple TIFF files, one TIFF file for each page within the document. If the input page is a single page TIFF file, a single page TIFF will still be output.
Each new TIFF will also have a new page created within the application environment which can be processed by subsequent rules. The original file name from which the page was extracted will be stored in the ParentImage variable, for possible future reference within your application.
If the input TIFF has a bit depth of 1 (black and white), then the output compression will be set to group 4 fax. If the input TIFF has a bit depth greater than 1, then the output compression will be uncompressed.
- Example 1:
-
SplitMultipageTiff()This example will create a new single page image for each image page within the source multi-page TIFF. Each page will have an associated DCO object so rules can be run on each new page. Subsequent rules could perform tasks such as image enhancement, fingerprinting, classification, recognition, verification and export.
- Example 2:
-
SetNamePattern("2") SplitMultipageTiff()This example will create the same pages as the first example, however this changes the default naming scheme so the new images will be named using the TMxxxxxx naming pattern instead of the 01010000 naming pattern.
- Example 3:
-
SplitTIFFPageRange(2,4,10-15,27-) SetNamePattern("2") SplitMultipageTiff()This example will extract page 2, page 4, pages 10 through 15, page 27 and all pages until the end of the file and the new images will be named with the TMxxxxxx naming convention.
- Example 4:
- Add action rrcompare (@P.original_source_image,yes) after action SplitMultipageTiff , if you want the action to return False for single tiffs, and for the next actions to not get executed. This action returns True if you pass multi page as input and False if you pass single tiff. action