GdPicture.NET.14 (COM - ActiveX)~GdPicture14_namespace / GdPicture.NET.14 (COM - ActiveX)~GdPicture14.GdPicturePDF / DrawBarcodeMicroMicroQrCode_2 Method
The data to encode using the required Micro QR Code symbol. Specifically the amount of data that can be stored in a Micro QR Code is max. 35 numerals.
A member of the BarcodeQREncodingMode enumeration. The QR Code encoding mode.

Choosing the correct encoding mode and the lowest error correction (2) will help ensure the symbol is as small as possible.

A member of the BarcodeMicroQRErrorCorrectionLevel enumeration. The error correction level.

These levels are defined in terms of percentage of codewords in the barcode that can be corrected if damaged. The higher the error correction level, the less storage capacity.

The version of the Micro QR Code, it specifies the overall dimensions of the symbol.

Micro QR Codes can be generated in 4 different symbol versions, from 21 x 21 modules (version M1) to 17 x 17 modules (version M4), therefore the range for this parameter is 0 - 4. You can use 0 to let the engine decide the minimum version required to encode all specified data.

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.

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.
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.
The amount of cyan color to be used for the symbol's resulting color. Use the value between 0 and 255.
The amount of magenta to be used for the symbol's resulting color. Use the value between 0 and 255.
The amount of yellow to be used for the symbol's resulting color. Use the value between 0 and 255.
The amount of black (key) color to be used for the symbol's resulting color. Use the value between 0 and 255.
Example





In This Topic
    DrawBarcodeMicroMicroQrCode_2 Method (GdPicturePDF)
    In This Topic
    Draws a required Micro QR Code onto the currently selected page of the loaded PDF document according to your preference.

    This method uses the CMYK color space for specifying the desired color of the Micro QR Code symbol.

    The coordinates and the dimensions of the Micro QR 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.

    Syntax
    'Declaration
     
    
    Public Function DrawBarcodeMicroMicroQrCode_2( _
       ByVal Data As String, _
       ByVal EncodingMode As BarcodeQREncodingMode, _
       ByVal ErrorCorrectionLevel As BarcodeMicroQRErrorCorrectionLevel, _
       ByVal Version As Integer, _
       ByVal ModuleSize As Integer, _
       ByVal DstX As Single, _
       ByVal DstY As Single, _
       ByVal Cyan As Byte, _
       ByVal Magenta As Byte, _
       ByVal Yellow As Byte, _
       ByVal Black As Byte _
    ) As GdPictureStatus
    public GdPictureStatus DrawBarcodeMicroMicroQrCode_2( 
       string Data,
       BarcodeQREncodingMode EncodingMode,
       BarcodeMicroQRErrorCorrectionLevel ErrorCorrectionLevel,
       int Version,
       int ModuleSize,
       float DstX,
       float DstY,
       byte Cyan,
       byte Magenta,
       byte Yellow,
       byte Black
    )
    public function DrawBarcodeMicroMicroQrCode_2( 
        Data: String;
        EncodingMode: BarcodeQREncodingMode;
        ErrorCorrectionLevel: BarcodeMicroQRErrorCorrectionLevel;
        Version: Integer;
        ModuleSize: Integer;
        DstX: Single;
        DstY: Single;
        Cyan: Byte;
        Magenta: Byte;
        Yellow: Byte;
        Black: Byte
    ): GdPictureStatus; 
    public function DrawBarcodeMicroMicroQrCode_2( 
       Data : String,
       EncodingMode : BarcodeQREncodingMode,
       ErrorCorrectionLevel : BarcodeMicroQRErrorCorrectionLevel,
       Version : int,
       ModuleSize : int,
       DstX : float,
       DstY : float,
       Cyan : byte,
       Magenta : byte,
       Yellow : byte,
       Black : byte
    ) : GdPictureStatus;
    public: GdPictureStatus DrawBarcodeMicroMicroQrCode_2( 
       string* Data,
       BarcodeQREncodingMode EncodingMode,
       BarcodeMicroQRErrorCorrectionLevel ErrorCorrectionLevel,
       int Version,
       int ModuleSize,
       float DstX,
       float DstY,
       byte Cyan,
       byte Magenta,
       byte Yellow,
       byte Black
    ) 
    public:
    GdPictureStatus DrawBarcodeMicroMicroQrCode_2( 
       String^ Data,
       BarcodeQREncodingMode EncodingMode,
       BarcodeMicroQRErrorCorrectionLevel ErrorCorrectionLevel,
       int Version,
       int ModuleSize,
       float DstX,
       float DstY,
       byte Cyan,
       byte Magenta,
       byte Yellow,
       byte Black
    ) 

    Parameters

    Data
    The data to encode using the required Micro QR Code symbol. Specifically the amount of data that can be stored in a Micro QR Code is max. 35 numerals.
    EncodingMode
    A member of the BarcodeQREncodingMode enumeration. The QR Code encoding mode.

    Choosing the correct encoding mode and the lowest error correction (2) will help ensure the symbol is as small as possible.

    ErrorCorrectionLevel
    A member of the BarcodeMicroQRErrorCorrectionLevel enumeration. The error correction level.

    These levels are defined in terms of percentage of codewords in the barcode that can be corrected if damaged. The higher the error correction level, the less storage capacity.

    Version
    The version of the Micro QR Code, it specifies the overall dimensions of the symbol.

    Micro QR Codes can be generated in 4 different symbol versions, from 21 x 21 modules (version M1) to 17 x 17 modules (version M4), therefore the range for this parameter is 0 - 4. You can use 0 to let the engine decide the minimum version required to encode all specified data.

    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.

    Remarks
    Please note that this method is only allowed for use with non-encrypted documents.

    Just to remind you that 1 point is equivalent to 1/72 of an inch.

    Example
    How to draw various Micro QR Codes onto the newly created page of the new PDF document.
    Dim caption As String = "Example: DrawBarcodeMicroMicroQrCode_2"
    Dim oGdPicturePDF As New GdPicturePDF()
    Dim status As GdPictureStatus = oGdPicturePDF.NewPDF()
    If status = GdPictureStatus.OK Then
        oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
        oGdPicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter)
        status = oGdPicturePDF.NewPage(PdfPageSizes.PdfPageSizeLetter)
        If status = GdPictureStatus.OK Then
            If (oGdPicturePDF.DrawBarcodeQrCode_2("0123456789", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelM,
                                                  0, 2, 2, 2, 0, 255, 0, 0) = GdPictureStatus.OK) AndAlso
               (oGdPicturePDF.DrawBarcodeQrCode_2("0123456789", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelM,
                                                  0, 4, 6, 2, 0, 255, 0, 0) = GdPictureStatus.OK) AndAlso
               (oGdPicturePDF.DrawBarcodeQrCode_2("0123456789", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelM,
                                                  0, 6, 12, 2, v) = GdPictureStatus.OK) AndAlso
               (oGdPicturePDF.DrawBarcodeQrCode_2("9876543210", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelL,
                                                  0, 2, 2, 8, 255, 0, 0, 0) = GdPictureStatus.OK) AndAlso
               (oGdPicturePDF.DrawBarcodeQrCode_2("9876543210", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelL,
                                                  0, 4, 6, 8, 255, 0, 0, 0) = GdPictureStatus.OK) AndAlso
               (oGdPicturePDF.DrawBarcodeQrCode_2("9876543210", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelL,
                                                  0, 6, 12, 8, 255, 0, 0, 0) = GdPictureStatus.OK) Then
                status = oGdPicturePDF.SaveToFile("test_DrawBarcodeMicroMicroQrCode_2.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 DrawBarcodeMicroMicroQrCode_2() method has failed with the status: " + oGdPicturePDF.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
    oGdPicturePDF.Dispose()
    string caption = "Example: DrawBarcodeMicroMicroQrCode_2";
    GdPicturePDF oGdPicturePDF = new GdPicturePDF();
    GdPictureStatus status = oGdPicturePDF.NewPDF();
    if (status == GdPictureStatus.OK)
    {
        oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
        oGdPicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter);
        status = oGdPicturePDF.NewPage(PdfPageSizes.PdfPageSizeLetter);
        if (status == GdPictureStatus.OK)
        {
            if ((oGdPicturePDF.DrawBarcodeMicroMicroQrCode_2("0123456789", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelM,
                                                             0, 2, 2, 2, 0, 255, 0, 0) == GdPictureStatus.OK) &&
                (oGdPicturePDF.DrawBarcodeMicroMicroQrCode_2("0123456789", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelM,
                                                             0, 4, 6, 2, 0, 255, 0, 0) == GdPictureStatus.OK) &&
                (oGdPicturePDF.DrawBarcodeMicroMicroQrCode_2("0123456789", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelM,
                                                             0, 6, 12, 2, 0, 255, 0, 0) == GdPictureStatus.OK) &&
                (oGdPicturePDF.DrawBarcodeMicroMicroQrCode_2("9876543210", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelL,
                                                             0, 2, 2, 8, 255, 0, 0, 0) == GdPictureStatus.OK) &&
                (oGdPicturePDF.DrawBarcodeMicroMicroQrCode_2("9876543210", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelL,
                                                             0, 4, 6, 8, 255, 0, 0, 0) == GdPictureStatus.OK) &&
                (oGdPicturePDF.DrawBarcodeMicroMicroQrCode_2("9876543210", BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, BarcodeMicroQRErrorCorrectionLevel.BarcodeMicroQRErrorCorrectionLevelL,
                                                             0, 6, 12, 8, 255, 0, 0, 0) == GdPictureStatus.OK))
            {
                status = oGdPicturePDF.SaveToFile("test_DrawBarcodeMicroMicroQrCode_2.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 DrawBarcodeMicroMicroQrCode_2() method has failed with the status: " + oGdPicturePDF.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);
    oGdPicturePDF.Dispose();
    See Also