{"id":559,"date":"2012-11-26T09:05:41","date_gmt":"2012-11-26T09:05:41","guid":{"rendered":"http:\/\/www.bardecode.com\/newsite\/?p=559"},"modified":"2012-11-26T09:05:41","modified_gmt":"2012-11-26T09:05:41","slug":"performance-issues-using-skewtolerance","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/newsite\/performance-issues-using-skewtolerance\/","title":{"rendered":"Performance issues using SkewTolerance"},"content":{"rendered":"<p>The SkewTolerance property is used for the detection of barcodes in skewed documents, but it can have a negative impact on the performance of the ScanBarCode command, especially when reading PDf-417 and Datamatrix barcodes. One solution to this problem is to use xml settings, which allow you to store sets of properties which are applied successively until a barcode is decoded.<\/p>\n<p>For example, if you create a an xml file containing&#8230;<\/p>\n<p>&lt;xml version=&#8217;1.0&#8242; encoding=&#8217;iso-8859-1&#8242;&gt;<br \/>\n&lt;SoftekBarcode&gt;<br \/>\n&lt;Properties&gt;<br \/>\n&lt;ReadCode39&gt;1&lt;\/ReadCode39&gt;<br \/>\n&lt;ReadCode25&gt;1&lt;\/ReadCode25&gt;<br \/>\n&lt;ReadPDF417&gt;1&lt;\/ReadPDF417&gt;<br \/>\n&lt;ReadDataMatrix&gt;1&lt;\/ReadDataMatrix&gt;<br \/>\n&lt;MultipleRead&gt;1&lt;\/MultipleRead&gt;<br \/>\n&lt;ReadCode128&gt;1&lt;\/ReadCode128&gt;<br \/>\n&lt;ScanDirection&gt;15&lt;\/ScanDirection&gt;<br \/>\n&lt;MinLength&gt;4&lt;\/MinLength&gt;<br \/>\n&lt;MaxLength&gt;999&lt;\/MaxLength&gt;<br \/>\n&lt;ShowCheckDigit&gt;1&lt;\/ShowCheckDigit&gt;<br \/>\n&lt;SkewTolerance&gt;0&lt;\/SkewTolerance&gt;<br \/>\n&lt;\/Properties&gt;<br \/>\n&lt;Properties&gt;<br \/>\n&lt;SkewTolerance&gt;5&lt;\/SkewTolerance&gt;<br \/>\n&lt;\/Properties&gt;<br \/>\n&lt;\/SoftekBarcode&gt;<br \/>\n&lt;\/xml&gt;<\/p>\n<p>&#8230;and in your code replace the lines where you set the properties of the toolkit with one line:<\/p>\n<p>barcode.LoadXMLSettings(&#8220;settings.xml&#8221;)<\/p>\n<p>Then, when you call ScanBarCode, the toolkit will first apply tthe settings in the first section of the xml file and only set SkewTolerance to 5 if it wasn&#8217;t able to read a barcode in the normal orientations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The SkewTolerance property is used for the detection of barcodes in skewed documents, but it can have a negative impact on the performance of the ScanBarCode command, especially when reading PDf-417 and Datamatrix barcodes. One solution to this problem is to use xml settings, which allow you to store sets of properties which are applied &hellip; <\/p>\n","protected":false},"author":1,"featured_media":341,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,76,31],"tags":[98,99,96,72,81,97,100,95,48],"class_list":["post-559","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-image","category-settings","category-software-development-kits","tag-barcodes","tag-datamatrix","tag-images","tag-pdf-417","tag-performance","tag-read-barcodes","tag-skew","tag-skewed-barcodes","tag-toolkit"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/559"}],"collection":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/comments?post=559"}],"version-history":[{"count":2,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":561,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/559\/revisions\/561"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media\/341"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media?parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/categories?post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/tags?post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}