{"id":521,"date":"2012-11-23T11:09:01","date_gmt":"2012-11-23T11:09:01","guid":{"rendered":"http:\/\/www.bardecode.com\/en1\/?p=521"},"modified":"2013-03-05T11:47:17","modified_gmt":"2013-03-05T11:47:17","slug":"splitting-tif-files-by-barcode-position","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/en1\/splitting-tif-files-by-barcode-position\/","title":{"rendered":"Splitting TIF files by barcode position"},"content":{"rendered":"<p>The TifSplit feature of the toolkit allows you to use barcodes as document separators.\u00a0The input file is scanned for barcodes and then split into a number of smaller documents.<\/p>\n<p>There are 2 properties that control\u00a0how the input file is split:<\/p>\n<p>Setting\u00a0<strong>TifSplitPath<\/strong>\u00a0turns the feature on and controls\u00a0where the new documents will be created.<\/p>\n<ul>\n<li>e.g c:\\tmp\\Output%d.tif will create files Output1.tif, Output2.tif etc<\/li>\n<li>A\u00a0<strong>%s<\/strong>\u00a0in the path will be replaced by the value of the barcode separator.<\/li>\n<\/ul>\n<p><strong>TifSplitMode<\/strong>\u00a0controls how the input pages are copied to the output documents.<\/p>\n<ul>\n<li>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).<\/li>\n<li>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).<\/li>\n<li>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.<\/li>\n<\/ul>\n<p><strong>Example<\/strong><\/p>\n<p>Suppose there is a 6 page TIF file with barcodes on pages 2 and 5. The barcode on page 2 has the value &#8220;AAAAAA&#8221; and the barcode on page 5 has the value &#8220;BBBBBB&#8221;<\/p>\n<p>barcode.TifSplitPath = &#8220;C:\\tmp\\Output%s_%d.tif&#8221;<br \/>\nbarcode.TifSplitMode = 0<br \/>\nbarcode.ScanBarCode(InputPath)<\/p>\n<p>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.<\/p>\n<p>barcode.TifSplitPath = &#8220;C:\\tmp\\Output%s_%d.tif&#8221;<br \/>\nbarcode.TifSplitMode = 1<br \/>\nbarcode.ScanBarCode(InputPath)<\/p>\n<p>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.<\/p>\n<p>barcode.TifSplitPath = &#8220;C:\\tmp\\Output%s_%d.tif&#8221;<br \/>\nbarcode.TifSplitMode = 2<br \/>\nbarcode.ScanBarCode(InputPath)<\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The TifSplit feature of the toolkit allows you to use barcodes as document separators.\u00a0The input file is scanned for barcodes and then split into a number of smaller documents. There are 2 properties that control\u00a0how the input file is split: Setting\u00a0TifSplitPath\u00a0turns the feature on and controls\u00a0where the new documents will be created. e.g c:\\tmp\\Output%d.tif will<\/p>\n<p><a href=\"https:\/\/www.bardecode.com\/en1\/splitting-tif-files-by-barcode-position\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":337,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,31],"tags":[19,56,52,54,51,53,49,50,55],"class_list":["post-521","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge-base","category-software-development-kits","tag-barcode","tag-barcode-reader","tag-document","tag-efficiency","tag-image-2","tag-office","tag-spltting-documents","tag-tiff","tag-toollkit"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/521"}],"collection":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":5,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":1679,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/521\/revisions\/1679"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/media\/337"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}