Class PdfDataMatrixEncoding
Specifies the data matrix barcode encoding.
Inheritance
System.Object
PdfDataMatrixEncoding
Namespace: Syncfusion.Pdf.Barcode
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public sealed class PdfDataMatrixEncoding : Enum
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
ASCII
Encoding is done by ASCII encoder.
Declaration
public const PdfDataMatrixEncoding ASCII
Field Value
Type |
---|
PdfDataMatrixEncoding |
ASCIINumeric
Encoding is done by Numeric encoder.
Declaration
public const PdfDataMatrixEncoding ASCIINumeric
Field Value
Type |
---|
PdfDataMatrixEncoding |
Auto
Encoding is choosen based on the data.
Declaration
public const PdfDataMatrixEncoding Auto
Field Value
Type |
---|
PdfDataMatrixEncoding |
Base256
Encoding is done by Base256 encode.
Declaration
public const PdfDataMatrixEncoding Base256
Field Value
Type |
---|
PdfDataMatrixEncoding |