The TifSplit feature of the toolkit allows you to use barcodes as document separators. The input file is scanned for barcodes and then split into a number of smaller documents.
There are 2 properties that control how the input file is split:
Setting TifSplitPath turns the feature on and controls where the new documents will be created.
- e.g c:\tmp\Output%d.tif will create files Output1.tif, Output2.tif etc
- A %s in the path will be replaced by the value of the barcode separator.
TifSplitMode controls how the input pages are copied to the output documents.
- Mode=0 creates output files that contain a barcode on page 1 (the first output file will always start with page 1 of the input file).
- Mode=1 creates output files that contain a barcode on the last page (the last output file will always end with the last page of the input file).
- Mode=2 creates output files that contain no barcodes. A new output document is started each time the software finds a barcode in the input file.
Example
Suppose there is a 6 page TIF file with barcodes on pages 2 and 5. The barcode on page 2 has the value “AAAAAA” and the barcode on page 5 has the value “BBBBBB”
barcode.TifSplitPath = “C:\tmp\Output%s_%d.tif”
barcode.TifSplitMode = 0
barcode.ScanBarCode(InputPath)
will create 3 output files. Output_1.tif will contain page 1, OutputAAAAAA_2.tif will contain pages 2, 3 and 4, and OutputBBBBBB_3.tif will contain pages 5 and 6.
barcode.TifSplitPath = “C:\tmp\Output%s_%d.tif”
barcode.TifSplitMode = 1
barcode.ScanBarCode(InputPath)
will create 3 output files. OutputAAAAAA_1.tif will contain pages 1 and 2, OutputBBBBBB_2.tif will contain pages 3, 4 and 5, and Output_3.tif will contain page 6.
barcode.TifSplitPath = “C:\tmp\Output%s_%d.tif”
barcode.TifSplitMode = 2
barcode.ScanBarCode(InputPath)
will create 3 output files. Output_1.tif will contain page 1, OutputAAAAAA_2.tif will contain pages 3 and 4, and OutputBBBBBB_3.tif will contain page 6.
