Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kendo UI Cookbook

You're reading from   Kendo UI Cookbook Over 50 recipes to help you rapidly build rich and dynamic user interfaces for web and mobile platforms.

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781783980000
Length 250 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Sagar Ganatra Sagar Ganatra
Author Profile Icon Sagar Ganatra
Sagar Ganatra
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Kendo UI Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. The Kendo UI Application Framework FREE CHAPTER 2. The Kendo UI Grid 3. Kendo UI TreeView 4. Kendo UI Editor 5. Kendo UI PanelBar 6. Kendo UI File Uploader 7. Kendo UI Window 8. Kendo UI Mobile Framework 9. Kendo UI Mobile Widgets 10. Kendo UI DataViz 11. Kendo UI DataViz – Advance Charting Index

Generating barcode images using various encoding methods


The Kendo UI library provides APIs that can be used to generate the barcode graphic image for the given value. For example, each product in the supermarket can have a barcode associated with it. When a customer purchases the product, the barcode would be used to get the product price and other details. The library can generate the barcode by referring to the unique identifier.

How to do it…

A barcode image can be generated by invoking the kendoBarcode function on the DOM element:

$("#chart").kendoBarcode({
  value: '1234567'
});

Here, the 1234567 value will be encoded using the default encoding, that is, code39. You can also specify the encoding method to be used by specifying the type field:

$("#chart").kendoBarcode({
  value: '1234567',
  type: 'ean8'
});

In the preceding code snippet, the encoding type is set to ean8. The other possible values are EAN13, UPCE, UPCA, Code11, Code39, Code39Extended, Code93, Code93Extended, Code128, Code128A...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime