html5+ specification: Barcode (barcode Scanning)

Source: Internet
Author: User
<span id="Label3"></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Barcode Module Management Barcode scanning, provide common barcode (two-dimensional code and one-dimensional Code) scanning recognition function, can call the Device's camera to the barcode image scanning for data Input. Barcode Code Management Objects can be obtained through Plus.barcode.</span></p></p><strong><strong><span style="font-family:FangSong_GB2312; font-size:14px">1. Constants</span></strong></strong><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(1), qr: barcode Type constant, qr code, value is 0, 1994 by the Japanese Denso-wave company invented, QR from the English quick response abbreviation, that is, the meaning of rapid response, from the inventor hope that the QR code allows its content to be decoded quickly. The most widely used QR code is currently in Use.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(2), EAN13: bar code type constants, EAN Barcode code standard version, The value of 1, the International Association of Goods Coding in the global application of commodity barcode, is composed of 13 digits. The most extensive one-dimensional barcode is currently Used.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(3), EAN8: bar code type constant, Ena one-dimensional barcode simple version, The value of 2, the International Association of Goods Coding in the global application of commodity barcode, is composed of 8 digits.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(4), AZTEC: bar code type constant, AZTEC qr code, The value of 3,andrew Longacre was invented in 1995, the code is used for international publishing. The smallest Aztec code symbol encodes 13 digits or 12 English Letters. The maximum Aztec code symbol encodes 3832 digits or 3067 English letters or 1914 bytes of Data.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(5), datamatrix: barcode type constants, data matrix QR code, The value of 4,data Matrix formerly known as Data code, by the United States International information company (international Data matrix, referred to as Idmatrix) Invented in 1989. The encoded character set includes all ASCII characters and extended ASCII characters, the capacity can contain 2,235 English digital data, 1556 8-bit metadata, 3,116 Digital Data. Because the data matrix two-dimensional barcode only needs to read 20% of the data can be accurately read, it is suitable for use in the bar code easily damaged Places.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(6), UPCA: bar code type constant, UPC code standard version, The value of 5,UPC code is the United States Unified Code Commission developed a commodity barcode, mainly used in the United States and canada, often in the United States imports of goods can be Seen. UPC code Standard version is composed of 12 digits, so its loadline set is digital 0~9.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(7), upce: bar code type constant, UPC code shortened version, the value of 6,UPC code is the United States Uniform Codes Commission developed a commodity barcode, mainly used in the United States and canada, often in the United States imports of goods can be Seen. UPC code shortened version is composed of 8 digits, so its loadline set is digital 0~9.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(8), codabar: bar code type constant, Codabar code, the value of 7,codabar code was originally developed for the retail price labeling System. In 1975, when National Retail Merchants Association (NRMA) selected other symbol types as a standard, Codabar began to be used in a number of areas for Non-retail applications, library, Freight and Pharmaceuticals.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(9), CODE39: bar code type constant, Code39 one-dimensional barcode, the value of 8,code 39 yards is Intermec company introduced in 1975, one-dimensional barcode, 39 yards is a user-bidirectional scanning of the decentralized barcode, that is, between the two data codes, 39 yards must contain a meaningless blank (or fine white, Its logical value is 0), and 39 yards with the ability to support the text number, coding rules simple, Low error rate, can represent a number of characters and so on, 39 yards in various fields have a very wide range of Applications.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(10), CODE93: bar code type constant, Code93 code, the value of 9,code 93 yards barcode Symbology was designed by Intermec in 1982 to provide higher density and data security enhancements code39. It is a letter with a variable length Symbol. Code 93 is primarily used for information provided by the Canada postcode Supplement.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(11), CODE128: bar code type constant, Code128 code, the value of 10,code128 code is a high-density barcode introduced in 1981, CODE128 code can be expressed from ASCII 0 to ASCII 127 a total of 128 characters, it is called 128 YARDS. CODE128 code is widely used in the enterprise internal management, production process, Logistics control system of barcode code system, because of its excellent characteristics in the management Information system design is widespread use.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(12), itf: bar code type constant, ITF code, the value of 11,ITF bar code, also known as Cross 25 code, composed of 14-digit character Representative. Mainly used for transport packaging, printing conditions are poor, not allowed to print EAN-13 and upc-a bar code should be selected when a bar Code.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(13), maxicode: bar code type constant, Maxicode two-dimensional code, The value of 12,1996 year, the United States Association for automatic Identification (AIMUSA) to develop a unified symbol specification, called Maxicode two-dimensional barcode, Some people also call Uss-maxicode two-dimensional barcode (Uniform symbology specification-maxicode).</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(14), PDF417: Barcode Type constants, PDF 417 yards, The value of 13,pdf417 barcode is invented by the U.S. symbol company, PDF (portable data file) means "portable data files." Each barcode character that makes up a bar code consists of 4 bars and 4 empty total 17 modules, so it is called PDF417 Barcode. The biggest advantage of PDF417 barcode is its huge data capacity and extremely high error correction Capability.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(15), RSS14: Barcode Type constant, RSS 14 combination code, value for 14,RSS Barcode is the International Goods Coding Association EAN and the United States Unified Code Commission UCC developed RSS (reduced Space symbology) Barcode Symbol. It is a one-dimensional code and two-dimensional code combination Code. RSS series codes have a higher density than other linear barcodes because they can represent more characters.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">(16), rssexpanded: bar code type constants, Extended RSS combination code, The value of 15,rss barcode is the International Goods Coding Association EAN and the United States Unified Code Commission UCC developed RSS (reduced Space symbology) Barcode Symbol. It is a one-dimensional code and two-dimensional code combination Code. RSS series codes have a higher density than other linear barcodes because they can represent more characters. The extended RSS code is a linear code that can vary in length, allowing the data to be encoded on 74 numeric characters or 41 alphabetic characters of the AI unit Data.</span></p></p><strong><strong><span style="font-family:FangSong_GB2312; font-size:14px">2. Methods</span></strong></strong><p><p><span style="font-family:FangSong_GB2312; font-size:14px"><strong>scan: Scanning barcode</strong> data by image</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">void Plus.barcode.scan (path, successcb, errorcb, filters);</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Description: Scan Barcode data directly through the picture, after successfully scanning to barcode data through Successcallback callback return, failure is returned by Errorcallback Callback.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Parameters:</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Path: (String) The address of a required scanned picture, the address of the picture must be a local file address, such as a urltype type (such as a relative URL path starting with "_www", "_doc", "_documents", "_downloads") or a system absolute path.</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Successcb: ( <strong>barcodesuccesscallback </strong>) must scan barcode code image successful callback function, return bar code data</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Errorcb: ( <strong>barcodeerrorcallback</strong>) Optional Scan barcode image failed callback function, return error message</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Filters: ( <strong>array</strong>) Optional barcode type filter to identify, for bar code type constant array, barcode recognition engine can support a variety of two-dimensional code and one-dimensional code type, by default, support qr, EAN13, EAN8 three Types. You can use this parameter to set additional barcode types that need to be supported (note: the more barcode types you set up, the less efficient scan recognition will be).</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Return value: void: None</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Platform Support: android-2.2+ (support), ios-4.3+ (support)</span></p></p><p><p><span style="font-family:FangSong_GB2312; font-size:14px">Example:</span></p></p><p><p></p></p><pre code_snippet_id="1742272" snippet_file_name="blog_20160703_1_1516628" name="code" class="html"><pre code_snippet_id="1742272" snippet_file_name="blog_20160703_1_1516628" name="code" class="html"><! DOCTYPE Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.