Hi Team, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I am trying to generate QR code with maximum number of characters and facing following two problems:
1) We have used following code to generate QR code for text with length 4430 characters :
==============================================================================
//Instantiate linear barcode object
var builder = new BarCodeBuilder { CodeText = QRCodeText, SymbologyType = Symbology.QR, CodeLocation = CodeLocation.None, AutoSize = true };
// Set the Margins
builder.Margins.Top = 1f;
builder.Margins.Bottom = 1f;
builder.Margins.Left = 1f;
builder.Margins.Right = 1f;
//Creating memory stream
var ms = new MemoryStream();
//Saving QR code image to memory stream
builder.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
// Inserting QR code image in worksheet 2 - 37th row and Column'I' from memory stream
int pictureIndex = worksheet2.Pictures.Add(31, 7, 37, 9, ms);
Picture picture = worksheet2.Pictures[pictureIndex];
picture.Placement = PlacementType.Move;
================================================================================
And getting exception while creating QR code with number of characters greater than some specified limit; i.e. 2953. The exception is : “Maximum characters limit reached for Binary encode mode and LevelL error correction level. Encoded data length - 4430. Max available length - 2953.”
Please refer attached document to see the exceptions, I am getting at my end(ExceptionDocument.docx ) and provide me the suggestion to create QR code with as much text as we want.
2) If I have reduced the QR code text to 2953, then I am getting the QR code as in my pdf, which I am not able to scan. Please refer "QRCodeInOurDocument.png" to see the generated QR code using aspose.
On other hand, I have tried generating QR code for same text using some other tool available on https://www.the-qrcode-generator.com/ and got attached QR Code, which I am able to scan. Please refer "QRCodeGenerator.png".
Please let me know, why there is a difference between these two QR codes when I am generating both with same text and size, Or
Please suggest how can I achieve creating proper QR code using Aspose which can be scanned successfully.
Thanks in advance,
Preety