cete.dynamicpdf.pageelements.barcoding.aztec
Aztec
- Namespace: ceTe.DynamicPDF.PageElements.BarCoding
- Assemblies: ceTe.DynamicPDF.40.dll
Represents an Aztec barcode.
public class Aztec : Dim2Barcode, ICoordinate, ISerializable
Public Class Aztec
Inherits Dim2Barcode
Implements ICoordinate, ISerializable
Inheritance: Object → PageElement → TaggablePageElement → Dim2Barcode → Aztec
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 an Aztec 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 barcode
Dim barCode As Aztec = New Aztec("Hello World", 50, 50, AztecSymbolSize.Full, 5)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
class MyClass
{
static void Main()
{
// 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 barcode
Aztec barCode = new Aztec("Hello World", 50, 50, AztecSymbolSize.Full, 5);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Remarks
This class can be used to place an Aztec barcode on a page.
Constructors
Aztec(Byte[], Single, Single, AztecSymbolSize)
Initializes a new instance of the Aztec class.
public Aztec(Byte[] value, float x, float y, AztecSymbolSize size)
Public Sub New (value As Byte(), x As Single, y As Single, size As AztecSymbolSize)
Parameters
- value: Byte[]
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- size: AztecSymbolSize
The AztecSymbolSize of the barcode.
Aztec(Byte[], Single, Single, AztecSymbolSize, Single)
Initializes a new instance of the Aztec class.
public Aztec(Byte[] value, float x, float y, AztecSymbolSize size, float xDimension)
Public Sub New (value As Byte(), x As Single, y As Single, size As AztecSymbolSize, xDimension As Single)
Parameters
- value: Byte[]
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- size: AztecSymbolSize
The AztecSymbolSize of the barcode.
- xDimension: Single
The xDimension of the barcode.
Aztec(String, Single, Single, AztecSymbolSize)
Initializes a new instance of the Aztec class.
public Aztec(string value, float x, float y, AztecSymbolSize size)
Public Sub New (value As String, x As Single, y As Single, size As AztecSymbolSize)
Parameters
- value: String
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- size: AztecSymbolSize
The AztecSymbolSize of the barcode.
Aztec(String, Single, Single, AztecSymbolSize, Single)
Initializes a new instance of the Aztec class.
public Aztec(string value, float x, float y, AztecSymbolSize size, float xDimension)
Public Sub New (value As String, x As Single, y As Single, size As AztecSymbolSize, xDimension As Single)
Parameters
- value: String
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- size: AztecSymbolSize
The AztecSymbolSize of the barcode.
- xDimension: Single
The xDimension of the barcode.
Properties
AllowStructuredAppend
Gets or Sets a boolean indicating whether to allow structured append of the overflow barcodes.
public bool AllowStructuredAppend { get; set; }
Public Property AllowStructuredAppend As Boolean
Property Value
Remarks
If set to true , MessageID and Size should be set to a predefined value.
Angle
Gets or sets the angle of the barcode. (Inherited from Dim2Barcode)
public float Angle { get; set; }
Public Property Angle As Single
Property Value
Color
Gets or sets the Color for the barcode. (Inherited from Dim2Barcode)
public Color Color { get; set; }
Public Property Color As Color
Property Value
ErrorCorrection
Gets or Sets the error correction value.
public int ErrorCorrection { get; set; }
Public Property ErrorCorrection As Int32
Property Value
Remarks
Error correction value may be between 5% to 95%.
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
IsReaderInitializationSymbol
Gets or Sets a boolean representing if the barcode is a reader initialization symbol.
public bool IsReaderInitializationSymbol { get; set; }
Public Property IsReaderInitializationSymbol As Boolean
Property Value
Remarks
Setting true will mark the symbol as reader initialization symbol and the size of the symbol should be one of the following, R15xC15 Compact, R19xC19, R23xC23, R27xC27, R31xC31, R37xC37, R41xC41, R45xC45, R49xC49, R53xC53, R57xC57, R61xC61, R67xC67, R71xC71, R75xC75, R79xC79, R83xC83, R87xC87, R91xC91, R95xC95, R101xC101, R105xC105, R109xC109, however it is recommended to set Auto.
MessageID
Gets or Sets the message id for the overflow barcodes.
public string MessageID { get; set; }
Public Property MessageID As String
Property Value
Remarks
MessageID for the overflow barcodes. Default MessageID is 'A'. This is used only when AllowStructuredAppend is true .
PixelsPerXDimension
Gets or Sets the pixels per XDimension (Inherited from Dim2Barcode)
public int PixelsPerXDimension { get; set; }
Public Property PixelsPerXDimension As Int32
Property Value
ProcessTilde
Gets or Sets a boolean indicating whether to process tilde symbol in the input.
public bool ProcessTilde { get; set; }
Public Property ProcessTilde As Boolean
Property Value
Remarks
Setting true will check for ~ character and processes it for FNC1 or ECI characters.
Size
Gets the barcode size, AztecSymbolSize .
public AztecSymbolSize Size { get; }
Public Property Size As AztecSymbolSize
Property Value
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
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
Value
Gets the barocode value only if the string value is set.
public string Value { get; }
Public Property Value As String
Property Value
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
XDimension
Gets or sets the xDimension of the barcode. (Inherited from Dim2Barcode)
public float XDimension { get; set; }
Public Property XDimension As Single
Property Value
XDimensionMilliMeters
Gets or sets the XDimensionMilliMeters of the barcode. (Inherited from Dim2Barcode)
public float XDimensionMilliMeters { get; set; }
Public Property XDimensionMilliMeters As Single
Property Value
XDimensionMils
Gets or sets the XDimensionMils of the barcode. (Inherited from Dim2Barcode)
public float XDimensionMils { get; set; }
Public Property XDimensionMils As Single
Property Value
XDimensionsPerCentiMeter
Gets or sets the XDimensionsPerCentiMeter of the barcode. (Inherited from Dim2Barcode)
public float XDimensionsPerCentiMeter { get; set; }
Public Property XDimensionsPerCentiMeter As Single
Property Value
XDimensionsPerInch
Gets or sets the XDimensionsPerInch of the barcode. (Inherited from Dim2Barcode)
public float XDimensionsPerInch { get; set; }
Public Property XDimensionsPerInch As Single
Property Value
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
Methods
Draw(PageWriter)
Draws the Aztec barcode to the given PageWriter object.
public void Draw(PageWriter writer)
Sub Draw(writer As PageWriter)
Parameters
- writer: PageWriter
PageWriter object to receive the Aztec 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
- obj: Object
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 .
GetOverflowAztec()
Gets a new instance of the Aztec class.
public Aztec GetOverflowAztec()
Function GetOverflowAztec() As Aztec
Returns
Returns an Aztec object.
Examples
The following example shows how to use the GetOverflowAztec method to allow aztec barcodes to flow onto new pages as needed.
Imports System
Imports System.IO;
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create an Aztec barcode
Dim aztec As Aztec = New Aztec("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", 50, 50, AztecSymbolSize.R23xC23, 5)
aztec.AllowStructuredAppend = true
aztec.MessageID = "ID"
Do
' Create a Page
Dim MyPage As Page = New Page
' Add the aztec barcode to the page
MyPage.Elements.Add( aztec )
' Add Page to the document
MyDocument.Pages.Add(MyPage)
aztec = aztec.GetOverflowAztec()
Loop While Not aztec Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using System.IO;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create an Aztec barcode
Aztec aztec = new Aztec("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", 50, 50, AztecSymbolSize.R23xC23, 5);
aztec.AllowStructuredAppend = true;
aztec.MessageID = "ID";
do
{
// Create a Page
Page page = new Page();
// Add the Aztec barcode to the page
page.Elements.Add( aztec );
// Add page to the document
document.Pages.Add( page );
aztec = aztec.GetOverflowAztec();
} while( aztec != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Remarks
This method returns a new Aztec object that contains the remaining data that did not fit.
GetOverflowAztec(Single, Single)
Gets a new instance of the Aztec class.
public Aztec GetOverflowAztec(float x, float y)
Function GetOverflowAztec(x As Single, y As Single) As Aztec
Parameters
- x: Single
The X coordinate of the aztec barcode.
- y: Single
The Y coordinate of the aztec barcode.
Returns
Returns an Aztec object.
Examples
The following example shows how to use the GetOverflowAztec method with x and y co ordinates to allow aztec barcodes to flow onto new pages as needed.
Imports System
Imports System.IO;
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
float x = 10.0f;
float y = 10.0f;;
' Create an Aztec barcode
Dim aztec As Aztec = New Aztec("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", x, y, AztecSymbolSize.R23xC23, 5)
aztec.AllowStructuredAppend = true
aztec.MessageID = "ID"
Do
' Create a Page
Dim MyPage As Page = New Page
' Add the aztec barcode to the page
MyPage.Elements.Add( aztec )
' Add Page to the document
MyDocument.Pages.Add(MyPage)
aztec = aztec.GetOverflowAztec(x, y + 150)
Loop While Not aztec Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using System.IO;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
float x = 10.0f;
float y = 10.0f;;
// Create an Aztec barcode
Aztec aztec = new Aztec("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", x, y, AztecSymbolSize.R23xC23, 5);
aztec.AllowStructuredAppend = true;
aztec.MessageID = "ID";
do
{
// Create a Page
Page page = new Page();
// Add the Aztec barcode to the page
page.Elements.Add( aztec );
// Add page to the document
document.Pages.Add( page );
aztec = aztec.GetOverflowAztec(x, y + 150);
} while( aztec != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Remarks
This method returns a new Aztec object that contains the remaining data that did not fit.
GetSymbolHeight()
Returns the Height required to display the aztec barcode.
public float GetSymbolHeight()
Function GetSymbolHeight() As Single
Returns
A value representing the required width.
GetSymbolWidth()
Returns the Width required to display the aztec 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 .