C# Intelligent Mail Generator Library
C# Imaging - Intelligent Mail (OneCode) Generator


Generate Intelligent Mail Barcode on Images & Documents Using C#.NET Code

C# Imaging - Intelligent Mail (OneCode) Generator


Generate Intelligent Mail Barcode on Images & Documents Using C#.NET Code




C# Imaging - Intelligent Mail Barcode Add-On



Using C#.NET Barcode Creator Add-on of RasterEdge DocImage SDK for .NET, you can easily integrate fast & accurate Intelligent Mail (OneCode) barcode generating features into C#.NET imaging applications. This professional and 100% clean Intelligent Mail (OneCode) barcode generating SDK allows C# developers to generate Intelligent Mail (OneCode) barcode and draw created barcode on various image files (like GIF) and common document files (like PDF).


Related .net document control helps:
asp.net edit pdf text using c#: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
c# asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net pdf document viewer c#: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
c# asp.net word document viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
asp.net mvc excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
c# asp.net text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
asp.net edit pdf image using c#: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#


Written in managed C# code, this .NET Intelligent Mail (OneCode) barcode generation solution owns fully-featured functions for barcode generation on images and documents. Please look at the benefits of RasterEdge Visual C#.NET Intelligent Mail (OneCode) barcode creator add-on.


Thread-safe and robust Intelligent Mail (OneCode) barcode creator SDK, built on .NET Framework 2.0


Own advanced barcode generating features for Intelligent Mail (OneCode) drawing on raster image files using C#


Easy to create Intelligent Mail (OneCode) and insert generated barcode image into specified location of target document


Own comprehensive parameters to design and create Intelligent Mail (OneCode) barcode using C#.NET code


Generate & insert Intelligent Mail (OneCode) barcode into document image files in both .NET Web and Windows applications




C# Code for Customizing Intelligent Mail Barcode Generation



You can easily generator Intelligent Mail barcode and save it  to image files/object using this C#.NET barcode generator control. The following steps will show how to create a Intelligent Mail type barcode encoding numeric data text "01234567890123456789" 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 Intelligent Mail barcode.




private static Linear CreateBarcode()
        {
            Linear barcode = new Linear();// create a barcode
            barcode.Type = BarcodeType.ONECODE;// select barcode type
            barcode.Data = "01234567890123456789";// set barcode data
            barcode.X = 1.0F;// set x
            barcode.Y = 60.0F;// set y
            barcode.Resolution = 96;// set resolution
            barcode.Rotate = Rotate.Rotate0;// set rotation
            barcode.BarcodeWidth = 200;
            barcode.BarcodeHeight = 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 - Create Intelligent Mail on Image



RasterEdge .NET barcode generator control owns high compatibility with common C#.NET image managing applications. Using this C#.NET Intelligent Mail (OneCode) barcode creator add-on, developers can not only draw an Intelligent Mail (OneCode) barcode on png, gif, jpeg and bmp image files but also accurately specify the generation area where the linear barcode will be created.




private static void AddBarcodeToImage(Linear barcode)
        {
            REImage image = new REImage(inputDirectory + "Sample.png");
            barcode.DrawBarcode(image, 150F, 150F);
            image.Save(ImageType.PNG, outputDirectory + "Sample_Barcode.png");
        }





C# Imaging - Insert Intelligent Mail into Document Page



This Barcode Creator Add-on for C#.NET class applications can help developers easily integrate advanced Intelligent Mail (OneCode) barcode generating functionalities into your C#.NET document processing projects. The document types that are supported by this C#.NET Intelligent Mail (OneCode) barcode generating and inserting SDK are TIFF, PDF, Word, Excel and PowerPoint.


The C# code demos listed below will help developers finish barcode generation tasks programmatically: specify a page from source document file, create a high-quality Intelligent Mail (OneCode) barcode image and insert created Intelligent Mail (OneCode) barcode into selected document page (with defined location).



How to Draw Intelligent Mail (OneCode) 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(Linear 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");
        }




How to Draw Intelligent Mail (OneCode) 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(Linear 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");
        }




How to Create Intelligent Mail (OneCode) 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(Linear 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");
        }




How to Print Intelligent Mail (OneCode) 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(Linear 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");
        }




How to Generate Intelligent Mail (OneCode) on PowerPoint



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(Linear 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");
        }





Entire C# Code to Customize Intelligent Mail Generation



The following C# sample code illustrates how to create a customized Intelligent Mail (OneCode) barcode and add generated barcode to a png image file within C#.NET application.




// create REImage on which you want to draw the barcode
REImage reImage = new REImage("c:/Sample.png");

Linear barcode = new Linear();// create a barcode
barcode.Type = BarcodeType.ONECODE;// select barcode type
barcode.Data = "01234567890123456789";// set barcode data 

// Intelligent Mail (OneCode) size settings
barcode.UOM = RasterEdge.Imaging.Barcode.Creator.UnitOfMeasure.PIXEL;
barcode.X = 2.0F;
barcode.Y = 80F;
barcode.BarcodeHeight = 120;
barcode.BarcodeWidth = 120;
barcode.BottomMargin = 20;
barcode.TopMargin = 20;
barcode.BottomMargin = 20;
barcode.LeftMargin = 20;
barcode.RightMargin = 20;
barcode.AutoResize = false;
barcode.BarAlignment = AlignmentHori.Center;

// color related settings
barcode.BackColor = System.Drawing.Color.White;
barcode.ForeColor = System.Drawing.Color.Black;

// human-readable text related settings
barcode.ShowText = true;
barcode.TextFont = new Font("Arial", 9f, FontStyle.Regular);
barcode.TextMargin = 6F;
barcode.TextColor = System.Drawing.Color.Black;

// other related settings
barcode.Resolution = 96;
barcode.Rotate = Rotate.Rotate0;

barcode.DrawBarcode(reImage, 0, 0);// draw barcode on REImage with location x and y

reImage.Save(ImageType.PNG, @"c:/barcode.png");