Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue was in the last digit of QR Code. It was showing (. * - + and Sometimes X Y A B Z). The String is M*******7202 * is as Character. #535

Open
AshishExo opened this issue May 23, 2024 · 2 comments

Comments

@AshishExo
Copy link

Type of issue

Issue was in the last digit of QR Code. It was showing (. * - + and Sometimes X Y A B Z). The String is M*******7202 * is as Character.

How to solve this type issue??

QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeGenerator.QRCode qrCode = qrGenerator.CreateQrCode(code, QRCodeGenerator.ECCLevel.Q);
System.Web.UI.WebControls.Image imgBarCode = new System.Web.UI.WebControls.Image();
imgBarCode.Height = 950;
imgBarCode.Width = 950;
using (Bitmap bitMap = qrCode.GetGraphic(20))
{
using (MemoryStream ms = new MemoryStream())
{
bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
byte[] byteImage = ms.ToArray();
imgBarCode.ImageUrl = "data:image/png;base64," + Convert.ToBase64String(byteImage);
}
plBarCode.Controls.Add(imgBarCode);

    }

I am using the same code to generate the placard.

image

Using this version.

@codebude
Copy link
Owner

codebude commented May 23, 2024

Please use the current release (1.5.1). Version 1.0 is really, really old. From where did you get it?

Besides that: can you please upload one of the broken QR code images? I like to analyze it in detail.

@codebude
Copy link
Owner

Tested with the current release and couldn't reproduce the error. @AshishExo please confirm, that the current release solves your problem. (You can grab the current version via Nuget: https://www.nuget.org/packages/QRCoder)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants