Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, December 31, 2013 9:56:51 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

The attached VS2010 project contains the minimum code required to write a barcode on an image using LEADTOOLS 18.
It is based on the OpenSaveDemo shipped with the toolkit, and writes sample EAN 13 barcode using only these 4 lines of code:
============================================================
Leadtools.Barcode.BarcodeEngine engine = new Leadtools.Barcode.BarcodeEngine();
Leadtools.Barcode.BarcodeData data = new Leadtools.Barcode.BarcodeData(Leadtools.Barcode.BarcodeSymbology.EAN13, "012345678901");
data.Bounds = new Leadtools.Forms.LogicalRectangle(50, 50, 300, 100, Leadtools.Forms.LogicalUnit.Pixel);
engine.Writer.WriteBarcode(_viewer.Image, data, null);
============================================================

Other types of barcodes can be written just as easily by selecting a different BarcodeSymbology value. For example, you can add the following code to write Code 3 of 9:
============================================================
data = new Leadtools.Barcode.BarcodeData(Leadtools.Barcode.BarcodeSymbology.Code3Of9, "01234567");
data.Bounds = new Leadtools.Forms.LogicalRectangle(50, 150, 300, 100, Leadtools.Forms.LogicalUnit.Pixel);
engine.Writer.WriteBarcode(_viewer.Image, data, null);
============================================================

File Attachment(s):
OpenSave_BarcodeWrite.zip (10kb) downloaded 38 time(s).
Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.055 seconds.