menu

ASP.NET Web Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PdfDataMatrixEncoding

    Show / Hide Table of Contents

    Enum PdfDataMatrixEncoding

    Specifies the data matrix barcode encoding.

    Namespace: Syncfusion.Pdf.Barcode
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfDataMatrixEncoding
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    //Creates a new PDF datamatrix barcode.
    PdfDataMatrixBarcode datamatrix = new PdfDataMatrixBarcode();
    //Set data matrix barcode encoding.
     datamatrix.Encoding = PdfDataMatrixEncoding.ASCII;    
    //Sets the barcode text.
    datamatrix.Text = "Test";   
    //Set the dimention of the barcode.
    datamatrix.XDimension = 5;
    //Set the barcode location.
    datamatrix.Location = new PointF(100, 100);
    //Draws a barcode on the new Page.
    datamatrix.Draw(page);
    //Save document to disk.
    document.Save("output.pdf");
    //Close the document.
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Creates a new page and adds it as the last page of the document
    Dim page As PdfPage = document.Pages.Add()
    'Creates a new PDF datamatrix barcode.
    Dim datamatrix As New PdfDataMatrixBarcode()
    'Set data matrix barcode encoding.
    datamatrix.Encoding = PdfDataMatrixEncoding.ASCII    
    'Sets the barcode text.
    datamatrix.Text = "Test"  
    'Set the dimention of the barcode.
    datamatrix.XDimension = 5
    'Set the barcode location.
    datamatrix.Location = New PointF(100, 100)
    'Draws a barcode on the new Page.
    datamatrix.Draw(page)
    'Save document to disk.
    document.Save("output.pdf")
    'Close the document.
    document.Close(True)

    Fields

    Name Description
    ASCII

    Encoding is done by ASCII encoder.

    ASCIINumeric

    Encoding is done by Numeric encoder.

    Auto

    Encoding is choosen based on the data.

    Base256

    Encoding is done by Base256 encode.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved