C# Micro QR Code Generator Library
Micro QR Code Generation Guide
Create Micro QR Code on Image, TIFF, PDF, Word, Excel & PPTX in C#.NET Project
Micro QR Code Generator for C# is simply one barcode writing functionality of RasterEdge .NET imaging toolkit. With this component DLL,
users can develop C#.NET applications to create, print Micro QR Code 2D bar codes in images such as png, jpeg/jpg, gif and bmp.
Besides these image formats, PDF, TIFF, Word, Excel and PowerPoint documents are also supported for barcode generation.
Developers can easily resize barcode image, change colors, and customize resolution & orientation using Visual C#.NET coding.
Related .net document control helps:
asp.net image viewer: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net document viewer:
EdgeDoc:ASP.NET Document Viewer C# Control:
Open, view, annotate, redact, convert documents online in C#, VB.NET, AS...
asp.net excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net pdf editor: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net pdf viewer: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net tiff viewer: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
Detailed features are listed below:
Draw scannable Data Matrix barcodes using Visual C#.NET programming
Write, create Data Matrix 2D barcode images on Png, Jpeg, Gif, and Bmp file formats
Add and print Data Matrix to TIFF, PDF, Word, Excel as well as PowerPoint in Visual C#.NET
Customize various Data Matrix settings, like image size, rotation/orientation, data mode, margins, ECL, color and more
Easily generate Data Matrix barcode images in C#.NET Windows & ASP.NET web applications
Compatible with latest GS1 specification for valid barcode scanning
C# Code for Customizing Micro QR Code Barcode Generation
You can easily generator Micro QR Code barcode and save it to image files/object using this C#.NET barcode generator control. The following steps will show how to create a Micro QR Code type barcode encoding numeric data text "123456789" into the image object with XImage.Barcode.Creator.
Add References
RasterEdge.Imaging.Basic.dll
RasterEdge.Imaging.Drawing.dll
RasterEdge.Imaging.Font.dll
RasterEdge.Imaging.Processing.dll
RasterEdge.XImage.BarcodeCreator.dll
System.Drawing.dll
Using Namespaces
using System.Drawing;
using RasterEdge.XImage.BarcodeCreator;
Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:
If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.
If using x86, the platform target should be x86.
Please copy the sample code as follow to generator a Micro QR Code barcode.
private static MicroQRCode CreateBarcode()
{
MicroQRCode barcode = new MicroQRCode ();// create a Data Matrix barcode
barcode.Data = "123456789";// encode data into Data Matrix barcode
barcode.X = 5.0F;// set module size
barcode.RightMargin = barcode.LeftMargin = barcode.TopMargin = barcode.BottomMargin = barcode.X; // the minimum value for each margin should be equal to X
barcode.Resolution = 96;// set barcode printing resolution
barcode.Rotate = Rotate.Rotate0;// set rotation
barcode.BarcodeHeight = 200;
barcode.BarcodeWidth = 200;
barcode.AutoResize = true;
//convert barcode to a bitmap and save it to image file
//Bitmap bmp = barcode.ToImage();
//bmp.Save(@"C:\barcode.bmp");
return barcode;
}
|

|
|
C# Imaging - Draw Micro QR Code on Image File
If you want to add Micro QR Code barcode generating features to your C#.NET image processing application, try this .NET Barcode Creator Add-on, which supports common raster image file formats: png, gif, jpeg, and bmp. Copy the sample code below to your C# imaging program and you can create a Micro QR Code on the bottom left corner of a sample png image.
You can change the location by setting X and Y coordinates in Visual C#.NET sample codes. For more Micro QR Code parameters, please refer to the table demonstrated below.
private static void AddBarcodeToImage(MicroQRCode barcode)
{
REImage image = new REImage(inputDirectory + "Sample.png");
barcode.DrawBarcode(image, 150F, 150F);
image.Save(ImageType.PNG, outputDirectory + "Sample_Barcode.png");
}
|
C# Imaging - Create Micro QR Code on Document Page
Besides .NET imaging applications, developers can also apply this barcode DLL to C#.NET document manipulating project. Currently we support document types like PDF, TIFF, Microsoft Word, Excel and PPTX, both single page file and multi-page ones. Displayed below are C# examples for drawing Micro QR Code to supported documents.
C# Code to Create Micro QR Code on PDF
Add References(Extra)
RasterEdge.Imaging.Basic.Codec.dll
RasterEdge.XImage.Raster.dll
RasterEdge.XImage.Raster.Core.dll
RasterEdge.XDoc.PDF.dll
Using Namespace(Extra)
RasterEdge.XDoc.PDF;
RasterEdge.Imaging.Basic;
RasterEdge.Imaging.Raster.Core;
private static void AddBarcodeToPDF(MicroQRCode barcode)
{
PDFDocument docx = new PDFDocument(inputDirectory + "Sample.pdf");
BasePage page = docx.GetPage(0);
REImage image = new REImage(barcode.ToImage());
page.AddImage(image, new PointF(100F, 100F));
docx.Save(outputDirectory + "Sample_Barcode.pdf");
}
|
C# Code to Draw Micro QR Code on TIFF
Add References(Extra)
RasterEdge.Imaging.Basic.Codec.dll
RasterEdge.XImage.Raster.dll
RasterEdge.XImage.Raster.Core.dll
RasterEdge.XDoc.TIFF.dll
Using Namespace(Extra)
RasterEdge.XDoc.TIFF;
RasterEdge.Imaging.Basic;
RasterEdge.Imaging.Raster.Core;
private static void AddBarcodeToTIFF(MicroQRCode barcode)
{
TIFFDocument docx = new TIFFDocument(inputDirectory + "Sample.tif");
BasePage page = docx.GetPage(0);
REImage image = new REImage(barcode.ToImage());
page.AddImage(image, new PointF(100F, 100F));
docx.Save(outputDirectory + "Sample_Barcode.tif");
}
|
C# Code to Draw Micro QR Code on Word
Add References(Extra)
RasterEdge.XDoc.Word.dll
RasterEdge.XImage.Raster.dll
RasterEdge.XImage.Raster.Core.dll
RasterEdge.XDoc.Office.Inner.Common.dll
RasterEdge.XDoc.Office.Inner..Office03.dll
Using Namespace(Extra)
RasterEdge.XDoc.Word;
RasterEdge.Imaging.Basic;
RasterEdge.Imaging.Raster.Core;
private static void AddBarcodeToWord(MicroQRCode barcode)
{
DOCXDocument docx = new DOCXDocument(inputDirectory + "Sample.docx");
BasePage page = docx.GetPage(0);
REImage image = new REImage(barcode.ToImage());
page.AddImage(image, new PointF(100F, 100F));
docx.Save(outputDirectory + "Sample_Barcode.docx");
}
|
C# Code to Add Micro QR Code Image on Excel
Add References(Extra)
RasterEdge.XDoc.Excel.dll
RasterEdge.XImage.Raster.dll
RasterEdge.XImage.Raster.Core.dll
RasterEdge.XDoc.Office.Inner.Common.dll
RasterEdge.XDoc.Office.Inner..Office03.dll
Using Namespace(Extra)
RasterEdge.XDoc.Excel;
RasterEdge.Imaging.Basic;
RasterEdge.Imaging.Raster.Core;
private static void AddBarcodeToExcel(MicroQRCode barcode)
{
XLSXDocument docx = new XLSXDocument(inputDirectory + "Sample.xlsx");
BasePage page = docx.GetPage(0);
REImage image = new REImage(barcode.ToImage());
page.AddImage(image, new PointF(100F, 100F));
docx.Save(outputDirectory + "Sample_Barcode.xlsx");
}
|
Draw Micro QR Code on PowerPoint Slide in C#.NET
Add References(Extra)
RasterEdge.XDoc.PowerPoint.dll
RasterEdge.XImage.Raster.dll
RasterEdge.XImage.Raster.Core.dll
RasterEdge.XDoc.Office.Inner.Common.dll
RasterEdge.XDoc.Office.Inner..Office03.dll
Using Namespace(Extra)
RasterEdge.XDoc.PowerPoint;
RasterEdge.Imaging.Basic;
RasterEdge.Imaging.Raster.Core;
private static void AddBarcodeToPowerPoint(MicroQRCode barcode)
{
PPTXDocument docx = new PPTXDocument(inputDirectory + "Sample.pptx");
BasePage page = docx.GetPage(0);
REImage image = new REImage(barcode.ToImage());
page.AddImage(image, new PointF(100F, 100F));
docx.Save(outputDirectory + "Sample_Barcode.pptx");
}
|