BarcodeDataMatrixWrite returns GenericError

General discussions about GdPicture.NET.
Post Reply
myogui
Posts: 1
Joined: Wed Jan 22, 2014 10:02 pm

BarcodeDataMatrixWrite returns GenericError

Post by myogui » Wed Jan 22, 2014 10:10 pm

Hi!

I'm using GdPicture.NET.9.barcode.2d.writer version 9.4.0.12 with .net 4.0.

When calling BarcodeDataMatrixWrite to generate a ASCII 40x40 2d code, I get a GenericError with some specific string value as input. If i change 1 character of that string, it's works fine. It also works fine 99.9% of time.

Can someone help me out? Thanks :)

See code below:

Code: Select all

    Private Const ARGB_WHITE As Integer = &HFFFFFFFF
    Private Const ARGB_BLACK As Integer = &HFF000000

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Using instanceGd = CreateInstanceGdPicture()
            Dim idImage As Integer = instanceGd.CreateNewGdPictureImage(80,
                                                                        80,
                                                                        24S,
                                                                        ARGB_WHITE)


            'works:
            Dim resultWorks As GdPictureStatus = instanceGd.BarcodeDataMatrixWrite(
                idImage,
                "0000076533USAG  1035950687MR69AUTRENSPROCUREVO     01",
                BarcodeDataMatrixEncodingMode.BarcodeDataMatrixEncodingModeASCII,
                BarcodeDataMatrixVersion.BarcodeDataMatrixVersion040x040,
                0, 2, 0, 0, 0.0F, ARGB_BLACK, ARGB_WHITE)

            'doesn't work
            'changed * in string value:
            '
            '0000076533USAG  1035950687MR69AUTRENSPROCUREVO     01
            '         *
            '0000076534USAG  1035950687MR69AUTRENSPROCUREVO     01

            'doesn't work:
            Dim resultsDoesntWork As GdPictureStatus = instanceGd.BarcodeDataMatrixWrite(
                idImage,
                "0000076534USAG  1035950687MR69AUTRENSPROCUREVO     01",
                BarcodeDataMatrixEncodingMode.BarcodeDataMatrixEncodingModeASCII,
                BarcodeDataMatrixVersion.BarcodeDataMatrixVersion040x040,
                0, 2, 0, 0, 0.0F, ARGB_BLACK, ARGB_WHITE)

        End Using

    End Sub

    <Obsolete("Must replace register key here")>
    Private Shared Function CreateInstanceGdPicture() As GdPictureImaging
        With New LicenseManager()
            'todo: replace key
            .RegisterKEY("use-your-own")
        End With

        Return New GdPictureImaging()
    End Function

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: BarcodeDataMatrixWrite returns GenericError

Post by Cedric » Thu Apr 17, 2014 4:09 pm

Hi there,

Sorry for the excessive delay, this indeed looks like a bug we still have because I've been able to reproduce it with GdPicture.NET 10.2.11
A bug report has been sent to the development team and will be investigated further soon.

Thanks for pointing this out to us and sorry again for being so long to answer!

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: BarcodeDataMatrixWrite returns GenericError

Post by Loïc » Sat Apr 19, 2014 5:29 pm

Hello,

The problem has been fixed for the next minor release.

With best regards,

Loïc Carrère

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests