Sign In  Sign Up Live-Chat

Aspose.BarCode 2.4

Last post 10-30-2008, 10:38 PM by zaxeer. 9 replies.
Sort Posts: Previous Next
  •  04-09-2008, 10:19 AM 121438

    Aspose.BarCode 2.4

    I have downloaded a trial dll files of Aspose.Barcode for .Net ver 2.4.

    I created a new project and used the Barcode control on a Windows Form.

    Unfortunatily, I was unable to set the correct encoding used for CodeText property of the barcode control.

    Does Aspose Barcode support international encoding such as "Windows-1256"?

    If yes, How can I set it to the correct encoding?


    This message was posted using Page2Forum from Aspose products - Documentation
     
  •  04-09-2008, 1:07 PM 121462 in reply to 121438

    Re: Aspose.BarCode 2.4

    Hi,

    Thanks for considering Aspose.

    All the supported symbologies are listed in the "Symbology Type" property of the barcode control.

    I think Windows-1256 is the character set encoding type. Aspose BarCode supports UTF-8 encoding which is capable of representing any character in the Unicode standard.

    Could you please post some sample data that you want to encode?


    Best Regards,

    Saqib Razzaq
    Support Developer
    Aspose Guangzhou Team

     
  •  10-05-2008, 11:52 AM 146613 in reply to 121462

    Re: Aspose.BarCode 2.4

    We are facing the same problem, Arabic and UTF-8.
    How can we test saving Arabic data into 2D barcode and then read it back?
    We need to prof this before purchasing your tool.

    Please advice.


    Sami AlSayyed
    Senior Software Engineer
     
  •  10-06-2008, 7:33 AM 146729 in reply to 146613

    Re: Aspose.BarCode 2.4

    Hi Sami,

    Thanks for considering Aspose.

    Please see the sample code snippet below that generates the barcode for an arabic (UTF-8) text. And then recognizes the codetext.

    Please change the UTF-8 text to your own. The method will return the recognized codetext. You can set in some UI control e.g. textbox that supports UTF-8 characters display support.

    public string GenerateAndRecognizeUTFBarCode()

    {

    Bitmap imgBarcode = null;

    // set license

    License license = new License();

    license.SetLicense("c:\\Aspose.Total.lic");

    try

    {

    // generate the barcode

    BarCodeBuilder objBarCodeBuilder = new BarCodeBuilder();

    objBarCodeBuilder.SymbologyType = Aspose.BarCode.Symbology.MacroPdf417;

    // set the codetext by converting it into unicode byte array

    byte[] byteArray = Encoding.Unicode.GetBytes("منحة");

    objBarCodeBuilder.SetCodeText(byteArray);

    imgBarcode = objBarCodeBuilder.GenerateBarCodeImage();

    imgBarcode.Save("c:\\barcodes.png");

    // recognize the above barcode

    BarCodeReader reader = new BarCodeReader("c:\\barcodes.png");

    reader.BarCodeReadType = BarCodeReadType.MacroPdf417;

    BarCodeInfo[] info = reader.Read();

    if (info.Length > 0)

    {

    Encoding unicode = Encoding.Unicode;

    // get the characters array from the bytes

    char[] unicodeChars = new char[unicode.GetCharCount(info[0].CodeBytes, 0, info[0].CodeBytes.Length)];

    unicode.GetChars(info[0].CodeBytes, 0, info[0].CodeBytes.Length, unicodeChars, 0);

    // build unicode string

    string strCodeText = new string(unicodeChars);

    System.Console.WriteLine(strCodeText);

    return strCodeText;

    }

    return "no barcode found";

    }

    catch (Exception ex)

    {

    return ex.Message;

    }

    }


    Best Regards,

    Saqib Razzaq
    Support Developer
    Aspose Guangzhou Team

     
  •  10-28-2008, 11:02 PM 149886 in reply to 146729

    Re: Aspose.BarCode 2.4

    Hello,
    I am also evaluation your product, we also need a java based system to read 2d barcode which has information in urdu language you API reads data but for urdu characters it shows "??????".
    I tried the approach in the above code for Java API too but not succeeded.
    We are not generating barcode we just need to read, So i need your help regarding this issue.

    Thanks
     
    Filed under: urdu barcode 2d
     
  •  10-29-2008, 1:39 AM 149906 in reply to 149886

    Re: Aspose.BarCode 2.4

    Hi,

    Could you please post the sample image file here, which has Urdu characters in it. I would like to test barcode recognition from this image.


    Best Regards,

    Saqib Razzaq
    Support Developer
    Aspose Guangzhou Team

     
  •  10-30-2008, 1:10 AM 150124 in reply to 149906

    Re: Aspose.BarCode 2.4

    Hello,

    I am using my own Computer Nation Identity Card scanned  bar code for testing. I am not sure that what type of charset they are using in it.

    Any ways i am also sending you my id card bar code image at you profile e-mail address "saqibrazzaq@msn.com".
    if you can try on it, will be helpful.

    thanks

    Zaheer
    zaxeer@gmail.com
     
  •  10-30-2008, 5:47 AM 150166 in reply to 150124

    Re: Aspose.BarCode 2.4

    Hi Zaheer,

    I have got the image that you sent. I would recommend sending emails via the forum by clicking "Contact" --> "Send username an email".

    We are looking into recognizing barcode from it.

    But, if possible, could you please find how the barcode was generated. For example, as a bytes array or a unicode string or some other way. We tried to recognize, but the urdu character recognition failed both ways. We will try to find some way, but if we know how it was generated.


    Best Regards,

    Saqib Razzaq
    Support Developer
    Aspose Guangzhou Team

     
  •  10-30-2008, 10:43 AM 150214 in reply to 150166

    Re: Aspose.BarCode 2.4

    Following the specification of PDF417, the barcodes encodes ASCII or 8-bits binary datas, so our reader can retrieve the information as string (BarCodeInfo.CodeText) or bytes(BarCodeInfo.CodeBytes), but the barcode does not contain the information
    about encoding, so the reader is not able to know the data is in urdu (UTF-8) or something else.
     
    It should be recognized in the same way as it was generated. For example, if you generate a barcode for string, you will check the CodeText property when you recognize it. And if you convert a string into byte array after applying some encoding type e.g. UTF-8 or else, you need to recognize it as byte array and then again build your string according to the encoding type that you specified.

    In short, we should know how the barcode was generated and the correct enciding type. Otherwise, you will get an ASCII string in CodeText and a byte array in CodeBytes property. You need to know beforehand what to do with the byte array to get your original text.

    I hope I made myself clear enough.

    I also checked some demos of other barcode recognition products, they also returned ??? characters in place of Urdu characters.


    Best Regards,

    Saqib Razzaq
    Support Developer
    Aspose Guangzhou Team

     
  •  10-30-2008, 10:38 PM 150356 in reply to 150214

    Re: Aspose.BarCode 2.4

    Hello Saqib,

    Thanks for the help and testing, the bar code is not generated by me, its from NADRA for Digital National Identity Card , so may be they have some encryption or mixed type of encoding scheme.

    As you have seen that data in digits or normal ASCII character which take one byte for each character is coming fine, but for unicode characters where i think 2 bytes will be used not coming, i also tried with some other products but same problem.

    Any how thanks for help and support.

    Thanks
    Zaheer

     
     
View as RSS news feed in XML