GdPicture image identifier.
The data of the barcode to encode.
A member of the BarcodePDF417EncodingMode enumeration. The encoding mode.
A member of the BarcodePDF417ErrorCorrectionLevel enumeration. The error correction level.
Specifies the number of rows constituting the barcode. Use 0 for automatic computation (recommended) or a value in the range [3 - 90].
Specifies the number of columns constituting the barcode. Use 0 for automatic computation (recommended) or a value in the range [3 - 30].
The number of modules composing the quiet zone. The quiet zone defines the margin around the barcode. A value superior or equal to 4 is highly suggested.
The width of each module, in pixels. A value superior or equal to 4 is recommended.
The height of each row, in pixels. A value superior or equal to 10 is recommended.
The left position, in pixels, of the PDF417 barcode.
The top position, in pixels, of the PDF417 barcode.
The PDF417 barcode angle.
Color of the symbols. A suitable color value can be obtained by using the ARGB() method.
Color of the background. A suitable color value can be obtained by using the ARGB() method.
Example





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / BarcodePDF417Write Method / BarcodePDF417Write(Int32,String,BarcodePDF417EncodingMode,BarcodePDF417ErrorCorrectionLevel,Int32,Int32,Int32,Int32,Int32,Int32,Int32,Single,Color,Color) Method

BarcodePDF417Write(Int32,String,BarcodePDF417EncodingMode,BarcodePDF417ErrorCorrectionLevel,Int32,Int32,Int32,Int32,Int32,Int32,Int32,Single,Color,Color) Method

In This Topic
Draws a PDF417 barcode on a GdPicture image.
Syntax
'Declaration
 
Public Overloads Function BarcodePDF417Write( _
   ByVal ImageID As Integer, _
   ByVal Data As String, _
   ByVal EncodingMode As BarcodePDF417EncodingMode, _
   ByVal ErrorCorrectionLevel As BarcodePDF417ErrorCorrectionLevel, _
   ByVal Rows As Integer, _
   ByVal Cols As Integer, _
   ByVal QuietZone As Integer, _
   ByVal ModuleWidth As Integer, _
   ByVal RowHeight As Integer, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal Angle As Single, _
   ByVal FillColor As Color, _
   ByVal BackColor As Color _
) As GdPictureStatus
public function BarcodePDF417Write( 
    ImageID: Integer;
    Data: String;
    EncodingMode: BarcodePDF417EncodingMode;
    ErrorCorrectionLevel: BarcodePDF417ErrorCorrectionLevel;
    Rows: Integer;
    Cols: Integer;
    QuietZone: Integer;
    ModuleWidth: Integer;
    RowHeight: Integer;
    DstLeft: Integer;
    DstTop: Integer;
    Angle: Single;
    FillColor: Color;
    BackColor: Color
): GdPictureStatus; 
public function BarcodePDF417Write( 
   ImageID : int,
   Data : String,
   EncodingMode : BarcodePDF417EncodingMode,
   ErrorCorrectionLevel : BarcodePDF417ErrorCorrectionLevel,
   Rows : int,
   Cols : int,
   QuietZone : int,
   ModuleWidth : int,
   RowHeight : int,
   DstLeft : int,
   DstTop : int,
   Angle : float,
   FillColor : Color,
   BackColor : Color
) : GdPictureStatus;

Parameters

ImageID
GdPicture image identifier.
Data
The data of the barcode to encode.
EncodingMode
A member of the BarcodePDF417EncodingMode enumeration. The encoding mode.
ErrorCorrectionLevel
A member of the BarcodePDF417ErrorCorrectionLevel enumeration. The error correction level.
Rows
Specifies the number of rows constituting the barcode. Use 0 for automatic computation (recommended) or a value in the range [3 - 90].
Cols
Specifies the number of columns constituting the barcode. Use 0 for automatic computation (recommended) or a value in the range [3 - 30].
QuietZone
The number of modules composing the quiet zone. The quiet zone defines the margin around the barcode. A value superior or equal to 4 is highly suggested.
ModuleWidth
The width of each module, in pixels. A value superior or equal to 4 is recommended.
RowHeight
The height of each row, in pixels. A value superior or equal to 10 is recommended.
DstLeft
The left position, in pixels, of the PDF417 barcode.
DstTop
The top position, in pixels, of the PDF417 barcode.
Angle
The PDF417 barcode angle.
FillColor
Color of the symbols. A suitable color value can be obtained by using the ARGB() method.
BackColor
Color of the background. A suitable color value can be obtained by using the ARGB() method.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

This method requires the Barcode Reading & Writing component to run.

Example
Rendering a PDF417 barcode into a new image and saving the result into a png file.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    // String that have to be encoded into a barcode.
    string data = "PDF417 Barcode";
 
    BarcodePDF417EncodingMode encodingMode = BarcodePDF417EncodingMode.BarcodePDF417EncodingModeUndefined;
    // Level 0 to 8 are allowed, the number of error correction codewords is 2^(n+1).
    BarcodePDF417ErrorCorrectionLevel errorCorrectionLevel = BarcodePDF417ErrorCorrectionLevel.BarcodePDF417ErrorCorrectionLevelAuto;
    int moduleSize = 5;
    Color fillColor = gdpictureImaging.ARGB(255, 0, 0, 0);
    Color backColor = gdpictureImaging.ARGB(0, 255, 255, 255);
    int rows = 0, columns = 0; // Let the encoder choose the best ratio.
    int quietZone = 3; // 3 modules wide
 
    // Compute size (in pixels), required to render a PDF417 barcode.
    gdpictureImaging.BarcodePDF417GetSize(data, encodingMode, ref errorCorrectionLevel, ref rows, ref columns, quietZone, moduleSize, 17 * moduleSize, out int width, out int height);
 
    int imageID = gdpictureImaging.CreateNewGdPictureImage(width, height, 32, Color.White);
    gdpictureImaging.BarcodePDF417Write(imageID, data, encodingMode, errorCorrectionLevel, rows, columns, quietZone, moduleSize, 17 * moduleSize, 0, 0, 0, fillColor, backColor);
    gdpictureImaging.SaveAsPNG(imageID, "PDF417.png");
 
    // Release used resources.
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also