DrawBarcodeAztec(String,BarcodeAztecCodeVersion,Int32,Int32,Int32,Single,Single,Byte,Byte,Byte,Byte) Method
Draws a required Aztec Code (a type of 2D barcode) onto the currently selected page of the loaded PDF document according to your preference.
This method uses the CMYK color space for defining the desired fill color of the barcode symbol.
The coordinates and the dimensions of the Aztec Code symbol need to be set in the current units with respect to the currently located origin defined in the PDF document, related to the actual page, where the symbol is to be drawn. You can use the GdPicturePDF.GetMeasurementUnit method to determine the currently defined units and you can use the GdPicturePDF.SetMeasurementUnit method to reset the units according to your preference.
public GdPictureStatus DrawBarcodeAztec(
string ,
BarcodeAztecCodeVersion ,
int ,
int ,
int ,
float ,
float ,
byte ,
byte ,
byte ,
byte
)
public function DrawBarcodeAztec(
: String,
: BarcodeAztecCodeVersion,
: int,
: int,
: int,
: float,
: float,
: byte,
: byte,
: byte,
: byte
) : GdPictureStatus;
public: GdPictureStatus DrawBarcodeAztec(
string* ,
BarcodeAztecCodeVersion ,
int ,
int ,
int ,
float ,
float ,
byte ,
byte ,
byte ,
byte
)
public:
GdPictureStatus DrawBarcodeAztec(
String^ ,
BarcodeAztecCodeVersion ,
int ,
int ,
int ,
float ,
float ,
byte ,
byte ,
byte ,
byte
)
'Declaration
Public Overloads Function DrawBarcodeAztec( _
ByVal As String, _
ByVal As BarcodeAztecCodeVersion, _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Single, _
ByVal As Single, _
ByVal As Byte, _
ByVal As Byte, _
ByVal As Byte, _
ByVal As Byte _
) As GdPictureStatus
Parameters
- Data
- The data to encode using the required barcode symbol.
- Version
- A member of the BarcodeAztecCodeVersion enumeration. The version of the Aztec Code.
You can use the BarcodeAztecCodeVersion.BarcodeAztecCodeVersionAuto to let the engine decide the minimum version required to encode all specified data.
- EccPercent
- The percentage of error correction level. These levels are defined in terms of percentage of codewords in the barcode symbol that can be corrected if damaged.
You can use the values between 5 and 95, otherwise the default value 23 is used.
- QuietZone
- The number of modules composing the quiet zone, although this barcode symbol does not require any mandatory quiet zone.
- ModuleSize
- The size of each module within the drawn symbol, in points.
The module is the smallest cell in the symbol. The module size has to be made out of at least 2×2 printed dots for bigger reliability, therefore the recommended value for this parameter is 4 and greater.
- DstX
- The horizontal (X) coordinate of the destination point, expressed in the current units specified by the SetMeasurementUnit method with respect to the defined origin,
related to the currently selected page.
- DstY
- The vertical (Y) coordinate of the destination point, expressed in the current units specified by the SetMeasurementUnit method with respect to the defined origin,
related to the currently selected page.
- Cyan
- The amount of cyan color to be used for the symbol's resulting color. Use the value between 0 and 255.
- Magenta
- The amount of magenta to be used for the symbol's resulting color. Use the value between 0 and 255.
- Yellow
- The amount of yellow to be used for the symbol's resulting color. Use the value between 0 and 255.
- Black
- The amount of black (key) color to be used for the symbol's resulting color. Use the value between 0 and 255.
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
We strongly recommend always checking this status first.
How to draw various Aztec codes onto the newly created page of the new PDF document.
Dim caption As String = "Example: DrawBarcodeAztec"
Dim gdpicturePDF As GdPicturePDF = New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.NewPDF()
If status = GdPictureStatus.OK Then
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter)
status = gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeLetter)
If status = GdPictureStatus.OK Then
If (gdpicturePDF.DrawBarcodeAztec("0123456789", BarcodeAztecCodeVersion.BarcodeAztecCodeVersionAuto, 23, 0, 4, 2, 2, 0, 255, 255, 0) = GdPictureStatus.OK) AndAlso
(gdpicturePDF.DrawBarcodeAztec("0123456789", BarcodeAztecCodeVersion.BarcodeAztecCodeVersion1, 23, 0, 6, 6, 2, 0, 255, 255, 0) = GdPictureStatus.OK) AndAlso
(gdpicturePDF.DrawBarcodeAztec("0123456789", BarcodeAztecCodeVersion.BarcodeAztecCodeVersionCompact1, 23, 0, 8, 12, 2, 0, 255, 255, 0) = GdPictureStatus.OK) Then
status = gdpicturePDF.SaveToFile("test_DrawBarcodeAztec.pdf")
If status = GdPictureStatus.OK Then
MessageBox.Show("The example has been followed successfully and the file has been saved.", caption)
Else
MessageBox.Show("The example has been followed successfully, but the file can't be saved. Status: " + status.ToString(), caption)
End If
Else
MessageBox.Show("The one of the DrawBarcodeAztec() method has failed with the status: " + gdpicturePDF.GetStat().ToString(), caption)
End If
Else
MessageBox.Show("The NewPage() method has failed with the status: " + status.ToString(), caption)
End If
Else
MessageBox.Show("The NewPDF() method has failed with the status: " + status.ToString(), caption)
End If
gdpicturePDF.Dispose()
string caption = "Example: DrawBarcodeAztec";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.NewPDF();
if (status == GdPictureStatus.OK)
{
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter);
status = gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeLetter);
if (status == GdPictureStatus.OK)
{
if ((gdpicturePDF.DrawBarcodeAztec("0123456789", BarcodeAztecCodeVersion.BarcodeAztecCodeVersionAuto, 23, 0, 4, 2, 2, 0, 255, 255, 0) == GdPictureStatus.OK) &&
(gdpicturePDF.DrawBarcodeAztec("0123456789", BarcodeAztecCodeVersion.BarcodeAztecCodeVersion1, 23, 0, 6, 6, 2, 0, 255, 255, 0) == GdPictureStatus.OK) &&
(gdpicturePDF.DrawBarcodeAztec("0123456789", BarcodeAztecCodeVersion.BarcodeAztecCodeVersionCompact1, 23, 0, 8, 12, 2, 0, 255, 255, 0) == GdPictureStatus.OK))
{
status = gdpicturePDF.SaveToFile("test_DrawBarcodeAztec.pdf");
if (status == GdPictureStatus.OK)
MessageBox.Show("The example has been followed successfully and the file has been saved.", caption);
else
MessageBox.Show("The example has been followed successfully, but the file can't be saved. Status: " + status.ToString(), caption);
}
else
MessageBox.Show("The one of the DrawBarcodeAztec() method has failed with the status: " + gdpicturePDF.GetStat().ToString(), caption);
}
else
MessageBox.Show("The NewPage() method has failed with the status: " + status.ToString(), caption);
}
else
MessageBox.Show("The NewPDF() method has failed with the status: " + status.ToString(), caption);
gdpicturePDF.Dispose();
Reference
GdPicturePDF Class
GdPicturePDF Members
Overload List
SetMeasurementUnit Method
SetOrigin Method
GetMeasurementUnit Method
GetOrigin Method
DrawBarcode1D(Barcode1DWriterType,String,Single,Single,Single,Single,Byte,Byte,Byte) Method
DrawBarcodeDataMatrix(String,BarcodeDataMatrixEncodingMode,BarcodeDataMatrixVersion,Int32,Single,Single,Byte,Byte,Byte) Method
DrawBarcodeMicroMicroQrCode(String,BarcodeQREncodingMode,BarcodeMicroQRErrorCorrectionLevel,Int32,Int32,Single,Single,GdPictureColor) Method
DrawBarcodePDF417(String,BarcodePDF417EncodingMode,BarcodePDF417ErrorCorrectionLevel,Int32,Int32,Int32,Int32,Single,Single,Byte,Byte,Byte) Method
DrawBarcodeQrCode(String,BarcodeQREncodingMode,BarcodeQRErrorCorrectionLevel,Int32,Int32,Single,Single,GdPictureColor) Method