JS barcode (one-dimensional code) Plug-In JsBarcode Usage Details [encoding type, parameters, attributes], jsjsbarcode

Source: Internet
Author: User
Tags italic font

JS barcode (one-dimensional code) Plug-In JsBarcode Usage Details [encoding type, parameters, attributes], jsjsbarcode

This document describes how to use the JS barcode plug-in JsBarcode. We will share this with you for your reference. The details are as follows:

Here we will introduce the js plug-in for generating code on GitHub → JsBarcode

Bar codes support:

CODE128
CODE128 (automatic mode switch)
CODE128 A/B/C (forced Mode)
EAN
EAN-13
EAN-8
EAN-5
EAN-2
UPC ()
CODE39
ITF-14
MSI
MSI10
MSI11
MSI1010
MSI1110
Pharmacode
Codabar

Code:

<!DOCTYPE html>

JsBarcode we can also set some attributes of the bar code (you can set attributes details link: https://github.com/lindell/JsBarcode/wiki/Options)

 <script> JsBarcode ("# imgcode", "123", {format: "CODE39", // select the barcode type to use width: 3, // set the width between bars: 100, // The height displayValue: true, // whether text: "456" is displayed under the bar code, // overwrite the displayed text fontOptions: "bold italic", // bold or italic font: "fantasy", // set the text font textAlign: "left ", // set the text horizontal alignment mode textPosition: "top", // set the text vertical position textMargin: 5, // set the spacing between the barcode and text fontSize: 15, // set the size of the text background: "# eee", // set the background lineColor of the barcode: "#2196f3", // set the size of the bar and text Color. Margin: 15 // set the margin around the bar code}); </script>

GitHub: https://github.com/lindell/JsBarcode
Barcode generator: http://lindell.me/JsBarcode/generator/
JsBarcode example and settings: http://codepen.io/lindell/pen/mPvLXx? Editers = 1010
Simple JsBarcode Demo: http://codepen.io/lindell/pen/eZKBdO? Editers = 1010

Related Article

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.