Skip to main content

DataMatrixBarcode

Version: 10.0

cete.dynamicpdf.pageelements.barcoding.datamatrixbarcode

DataMatrixBarcode​

Represents a Data Matrix barcode.

public class DataMatrixBarcode : Dim2Barcode, ICoordinate, ISerializable
Public Class DataMatrixBarcode
Inherits Dim2Barcode
Implements ICoordinate, ISerializable

Inheritance: Object → PageElement → TaggablePageElement → Dim2Barcode → DataMatrixBarcode

Implements: ICoordinate, ISerializable

Licensing​

This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Examples​

The following example will place a Data Matrix barcode on the page.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding

Module MyModule

Sub Main()

' Create a PDF Document
Dim MyDocument As Document = New Document

' Create a Page and add it to the document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)

' Create a data matrix barcode
Dim dataMatrixBarcode As DataMatrixBarcode = New DataMatrixBarcode("DataMatrix Barcode", 100, 100)

' Add the data matrix barcode to the page
MyPage.Elements.Add(dataMatrixBarcode)

' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")

End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;

public class Example
{
public static void CreatePDF(string outputPath)
{
// Create a PDF Document
Document document = new Document();

// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add(page);

// Create a data matrix barcode
DataMatrixBarcode dataMatrixBarcode = new DataMatrixBarcode("DataMatrix barcode", 100, 100);

// Add the data matrix barcode to the page
page.Elements.Add(dataMatrixBarcode);

// Save the PDF
document.Draw(outputPath);
}
}

Remarks​

With some of the .Net runtimes (example: .Net Core 2.0), the ECI values 20, 28, 29 and 30 will give the error "No data is available for encoding 'code page number'. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.". To resolve this error refer the user manual page Encoding Considerations.

Constructors​

DataMatrixBarcode(Byte[], Single, Single)​

Initializes a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode(Byte[] value, float x, float y)
Public Sub New (value As Byte(), x As Single, y As Single)

Parameters​

The value of the barcode.

The X coordinate of the barcode.

The Y coordinate of the barcode.

DataMatrixBarcode(Byte[], Single, Single, DataMatrixSymbolSize)​

Initializes a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode(Byte[] value, float x, float y, DataMatrixSymbolSize dataMatrixSymbolSize)
Public Sub New (value As Byte(), x As Single, y As Single, dataMatrixSymbolSize As DataMatrixSymbolSize)

Parameters​

The value of the barcode.

The X coordinate of the barcode.

The Y coordinate of the barcode.

The symbol size of the barcode.

DataMatrixBarcode(Byte[], Single, Single, DataMatrixSymbolSize, DataMatrixEncodingType)​

Initializes a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode(Byte[] value, float x, float y, DataMatrixSymbolSize dataMatrixSymbolSize, DataMatrixEncodingType dataMatrixEncodingType)
Public Sub New (value As Byte(), x As Single, y As Single, dataMatrixSymbolSize As DataMatrixSymbolSize, dataMatrixEncodingType As DataMatrixEncodingType)

Parameters​

The value of the barcode.

The X coordinate of the barcode.

The Y coordinate of the barcode.

The symbol size of the barcode.

The encoding type of the barcode.

DataMatrixBarcode(Byte[], Single, Single, DataMatrixSymbolSize, DataMatrixEncodingType, DataMatrixFunctionCharacter)​

Initializes a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode(Byte[] value, float x, float y, DataMatrixSymbolSize dataMatrixSymbolSize, DataMatrixEncodingType dataMatrixEncodingType, DataMatrixFunctionCharacter dataMatrixFunctionCharacter)
Public Sub New (value As Byte(), x As Single, y As Single, dataMatrixSymbolSize As DataMatrixSymbolSize, dataMatrixEncodingType As DataMatrixEncodingType, dataMatrixFunctionCharacter As DataMatrixFunctionCharacter)

Parameters​

The value of the barcode.

The X coordinate of the barcode.

The Y coordinate of the barcode.

The symbol size of the barcode.

The encoding type of the barcode.

The function character of the barcode.

DataMatrixBarcode(String, Single, Single)​

Initializes a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode(string value, float x, float y)
Public Sub New (value As String, x As Single, y As Single)

Parameters​

The value of the barcode.

The X coordinate of the barcode.

The Y coordinate of the barcode.

DataMatrixBarcode(String, Single, Single, DataMatrixSymbolSize)​

Initializes a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode(string value, float x, float y, DataMatrixSymbolSize dataMatrixSymbolSize)
Public Sub New (value As String, x As Single, y As Single, dataMatrixSymbolSize As DataMatrixSymbolSize)

Parameters​

The value of the barcode.

The X coordinate of the barcode.

The Y coordinate of the barcode.

The symbol size of the barcode.

DataMatrixBarcode(String, Single, Single, DataMatrixSymbolSize, DataMatrixEncodingType)​

Initializes a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode(string value, float x, float y, DataMatrixSymbolSize dataMatrixSymbolSize, DataMatrixEncodingType dataMatrixEncodingType)
Public Sub New (value As String, x As Single, y As Single, dataMatrixSymbolSize As DataMatrixSymbolSize, dataMatrixEncodingType As DataMatrixEncodingType)

Parameters​

The value of the barcode.

The X coordinate of the barcode.

The Y coordinate of the barcode.

The symbol size of the barcode.

The encoding type of the barcode.

DataMatrixBarcode(String, Single, Single, DataMatrixSymbolSize, DataMatrixEncodingType, DataMatrixFunctionCharacter)​

Initializes a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode(string value, float x, float y, DataMatrixSymbolSize dataMatrixSymbolSize, DataMatrixEncodingType dataMatrixEncodingType, DataMatrixFunctionCharacter dataMatrixFunctionCharacter)
Public Sub New (value As String, x As Single, y As Single, dataMatrixSymbolSize As DataMatrixSymbolSize, dataMatrixEncodingType As DataMatrixEncodingType, dataMatrixFunctionCharacter As DataMatrixFunctionCharacter)

Parameters​

The value of the barcode.

The X coordinate of the barcode.

The Y coordinate of the barcode.

The symbol size of the barcode.

The encoding type of the barcode.

The function character of the barcode.

Properties​

Angle​

Gets or sets the angle of the barcode. (Inherited from Dim2Barcode)

public float Angle { get; set; }
Public Property Angle As Single

Property Value​

Single

Color​

Gets or sets the Color for the barcode. (Inherited from Dim2Barcode)

public Color Color { get; set; }
Public Property Color As Color

Property Value​

Color

ID​

Gets or sets the ID of the page element. (Inherited from PageElement)

public string ID { get; set; }
Public Property ID As String

Property Value​

String

PixelsPerXDimension​

Gets or Sets the pixels per XDimension (Inherited from Dim2Barcode)

public int PixelsPerXDimension { get; set; }
Public Property PixelsPerXDimension As Int32

Property Value​

Int32

ProcessTilde​

Gets or sets whether to process tilde character.

public bool ProcessTilde { get; set; }
Public Property ProcessTilde As Boolean

Property Value​

Boolean

Remarks​

Setting true will check for ~ character and processes it for FNC1 or ECI characters. With some of the .Net runtimes (example: .Net Core 2.0), the ECI values 20, 28, 29 and 30 will give the error "No data is available for encoding 'code page number'. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.". To resolve this error refer the user manual page Encoding Considerations.

Tag​

Gets or sets the tag of the taggable element. (Inherited from TaggablePageElement)

public Tag Tag { get; set; }
Public Property Tag As Tag

Property Value​

Tag

Licensing​

This property is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

TagOrder​

Gets or sets the tag order of the taggable element. (Inherited from TaggablePageElement)

public int TagOrder { get; set; }
Public Property TagOrder As Int32

Property Value​

Int32

X​

Gets or sets the X coordinate of the barcode. (Inherited from Dim2Barcode)

public float X { get; set; }
Public Property X As Single

Property Value​

Single

XDimension​

Gets or sets the xDimension of the barcode. (Inherited from Dim2Barcode)

public float XDimension { get; set; }
Public Property XDimension As Single

Property Value​

Single

XDimensionMilliMeters​

Gets or sets the XDimensionMilliMeters of the barcode. (Inherited from Dim2Barcode)

public float XDimensionMilliMeters { get; set; }
Public Property XDimensionMilliMeters As Single

Property Value​

Single

XDimensionMils​

Gets or sets the XDimensionMils of the barcode. (Inherited from Dim2Barcode)

public float XDimensionMils { get; set; }
Public Property XDimensionMils As Single

Property Value​

Single

XDimensionsPerCentiMeter​

Gets or sets the XDimensionsPerCentiMeter of the barcode. (Inherited from Dim2Barcode)

public float XDimensionsPerCentiMeter { get; set; }
Public Property XDimensionsPerCentiMeter As Single

Property Value​

Single

XDimensionsPerInch​

Gets or sets the XDimensionsPerInch of the barcode. (Inherited from Dim2Barcode)

public float XDimensionsPerInch { get; set; }
Public Property XDimensionsPerInch As Single

Property Value​

Single

Y​

Gets or sets the Y coordinate of the barcode. (Inherited from Dim2Barcode)

public float Y { get; set; }
Public Property Y As Single

Property Value​

Single

Methods​

Draw(PageWriter)​

Draws the datamatrix barcode to the given PageWriter object.

public void Draw(PageWriter writer)
Sub Draw(writer As PageWriter)

Parameters​

PageWriter object to receive the datamatrix barcode output.

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetOverFlowDataMatrixBarcode()​

Gets a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode GetOverFlowDataMatrixBarcode()
Function GetOverFlowDataMatrixBarcode() As DataMatrixBarcode

Returns​

Returns a DataMatrixBarcode object.

Remarks​

This method returns a new DataMatrixBarcode object that contains the remaining data that did not fit.

GetOverFlowDataMatrixBarcode(Single, Single)​

Gets a new instance of the DataMatrixBarcode class.

public DataMatrixBarcode GetOverFlowDataMatrixBarcode(float x, float y)
Function GetOverFlowDataMatrixBarcode(x As Single, y As Single) As DataMatrixBarcode

Parameters​

The X coordinate of the data matrix barcode.

The Y coordinate of the data matrix barcode.

Returns​

Returns a DataMatrixBarcode object.

Remarks​

This method returns a new DataMatrixBarcode object that contains the remaining data that did not fit.

GetSymbolHeight()​

Returns the height required to display the Data Matrix barcode.

public float GetSymbolHeight()
Function GetSymbolHeight() As Single

Returns​

A value representing the required height.

GetSymbolWidth()​

Returns the Width required to display the Data Matrix barcode.

public float GetSymbolWidth()
Function GetSymbolWidth() As Single

Returns​

A value representing the required width.

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF.PageElements.BarCoding