Re: Print barcode in C#
Posted by: sdfsfew Peter
Date: April 11, 2013 02:38AM

sdff dsffsd Wrote:
-------------------------------------------------------
> Good. Here is another useful code for generating
> QR Code barcode in C#
> (http://www.onbarcode.com/csharp/qr-code-generator.htmL):
> using System;
> using System.Collections.Generic;
> using System.Text;
> using OnBarcode.Barcode;
> using System.Drawing.Imaging;
> using System.Drawing;
>
>
> QRCode qrcode = new QRCode();
>
> // Barcode data to encode
> qrcode.Data = "ONBARCODE";
> // QR-Code data mode
> qrcode.DataMode = QRCodeDataMode.AlphaNumeric;
> // QR-Code format mode
> //qrcode.Version = QRCodeVersion.V10;
>
> /*
> * Barcode Image Related Settings
> */
> // Unit of meature for all size related setting
> in the library.
> qrcode.UOM = UnitOfMeasure.PIXEL;
> // Bar module size (X), default is 3 pixel;
> qrcode.X = 3;
> // Barcode image left, right, top, bottom
> margins. Defaults are 0.
> qrcode.LeftMargin = 0;
> qrcode.RightMargin = 0;
> qrcode.TopMargin = 0;
> qrcode.BottomMargin = 0;
> // Image resolution in dpi, default is 72 dpi.
> qrcode.Resolution = 72;
> // Created barcode orientation.
> //4 options are: facing left, facing right,
> facing bottom, and facing top
> qrcode.Rotate = Rotate.Rotate0;
>
> // Generate QR-Code and encode barcode to gif
> format
> qrcode.ImageFormat =
> System.Drawing.Imaging.ImageFormat.Gif;
> qrcode.drawBarcode("C:\\qrcode.gif");
>
> /*
> You can also call other drawing methods to
> generate barcodes
>
> public void drawBarcode(Graphics graphics);
>
> public void drawBarcode(string filename);
>
> public Bitmap drawBarcode();
>
> public void drawBarcode(Stream stream);
>
> */
> You can also find source code for generating QR
> Code barcode in
> Java(http://www.onbarcode.com/products/java_barcode/barcodes/qrcode.html).

That's cool. But the links you provided are not available. I checked.



Edited 2 time(s). Last edit at 04/11/2013 02:44AM by sdfsfew Peter.

Options: ReplyQuote


Subject
Written By
Posted
December 12, 2012 09:13PM
December 13, 2012 08:22AM
December 16, 2012 07:45PM
December 19, 2012 05:05AM
January 16, 2013 09:27PM
February 01, 2013 12:55AM
Re: Print barcode in C#
April 11, 2013 02:38AM
May 08, 2013 03:13AM
March 11, 2013 09:04PM
October 21, 2013 02:31AM
August 28, 2013 12:22AM
November 27, 2013 08:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.