{"id":579,"date":"2012-11-26T10:31:30","date_gmt":"2012-11-26T10:31:30","guid":{"rendered":"http:\/\/www.bardecode.com\/en1\/?p=579"},"modified":"2013-03-01T15:13:20","modified_gmt":"2013-03-01T15:13:20","slug":"identifying-output-files-when-using-tiff-split","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/en1\/identifying-output-files-when-using-tiff-split\/","title":{"rendered":"Identifying output files when using tiff split"},"content":{"rendered":"<p>This article explains how to correlate the output files produced during a tiff split process against the barcode values returned by GetBarString. The algorithm shown here assumes default split mode (TiffSplitMode = 0) and handles multiple barcodes on a single page and the possibility of no barcode on the first page.<\/p>\n<p>The code below uses the .net component, but it could equally be applied to\u00a0other interfaces if GetBarStringPage was replaced by GetBarStringPos. In the algorithm, fileIndex is only increased when the current barcode is on a new page, and the boolean variable doneFile is use to make sure that output files are only processed once.<\/p>\n<p>barcode = New SoftekBarcodeLib2.BarcodeReader<\/p>\n<p>barcode.TifSplitMode = 0<br \/>\nbarcode.TifSplitPath = &#8220;C:\\temp\\output%d.tif&#8221;<\/p>\n<p>nBarCodes = barcode.ScanBarCode(inputFilePath)<\/p>\n<p>Dim page As Integer<br \/>\nDim fileIndex As Integer<br \/>\nDim doneFile As Boolean<br \/>\nDim barstring As String<\/p>\n<p>page = 1<br \/>\nfileIndex = 1<br \/>\ndoneFile = False<\/p>\n<p>For i = 1 To nBarCodes<br \/>\nbarstring = barcode.GetBarString(i)<br \/>\nIf barcode.GetBarStringPage(i) &gt; page Then<br \/>\npage = barcode.GetBarStringPage(i)<br \/>\nfileIndex = fileIndex + 1<br \/>\ndoneFile = False<br \/>\nEnd If<br \/>\nIf doneFile = False Then<br \/>\nMsgBox(&#8220;Process file &#8221; &amp; fileIndex.ToString() &amp; &#8221; with lead barcode value &#8221; &amp; barstring)<br \/>\ndoneFile = True<br \/>\nEnd If<br \/>\nNext<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how to correlate the output files produced during a tiff split process against the barcode values returned by GetBarString. The algorithm shown here assumes default split mode (TiffSplitMode = 0) and handles multiple barcodes on a single page and the possibility of no barcode on the first page. The code below uses<\/p>\n<p><a href=\"https:\/\/www.bardecode.com\/en1\/identifying-output-files-when-using-tiff-split\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":328,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[76,31],"tags":[98,66,113,96,80,62,122,50,48],"class_list":["post-579","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-settings","category-software-development-kits","tag-barcodes","tag-development","tag-documents","tag-images","tag-settings-2","tag-software","tag-split","tag-tiff","tag-toolkit"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/579"}],"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=579"}],"version-history":[{"count":2,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/579\/revisions"}],"predecessor-version":[{"id":1642,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/579\/revisions\/1642"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/media\/328"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/media?parent=579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/categories?post=579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/tags?post=579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}