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

Adding TAB between strings #406

Closed
KayakFisher205 opened this issue Jun 6, 2022 · 2 comments
Closed

Adding TAB between strings #406

KayakFisher205 opened this issue Jun 6, 2022 · 2 comments

Comments

@KayakFisher205
Copy link

Type of issue

[ ] Bug
[X ] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement

Expected Behavior

I'm looking to take 2 strings and put 2 TABs between the strings, then create the QR Code.

Current Behavior

I've tried string.Format("{0}{1}{1}{2}",string1,"\t",string2) and string.Format("{0}{1}{1}{2}",string1,(char)9,string2) but so far, it just scans without the TABs.

I found an online QR generator where I was able to create a QR Code that does have them. I am just not sure how to do it in QRCoder.

Steps to Reproduce (for bugs)

QRCodeData qrCodeData = qrGenerator.CreateQrCode(string.Format("{0}{1}{1}{2}", grade, "\t", value), QRCodeGenerator.ECCLevel.Q);
var imgType = Base64QRCode.ImageType.Jpeg;
Base64QRCode qrCode = new Base64QRCode(qrCodeData);
return string.Format("data:image/{0};base64,{1}" , imgType.ToString().ToLower(), qrCode.GetGraphic(2, Color.Black, Color.White, true, imgType));

Your Environment

Below is the data used to create the correct QR code from an Online site.
image

@h4rdmol
Copy link

h4rdmol commented Sep 28, 2022

@KayakFisher205 from the code that you wrote it doesn't look like it will work. Because of typos.
In any case, please try to use a preformatted string.

string myString = string.Format("{0}{1}{1}{2}", grade, "\t", value);
QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(myString, QRCodeGenerator.ECCLevel.Q);
QRCode qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(20);

@codebude
Copy link
Owner

Can't reproduce the problem. Tabs should be encoded. If this is still a thing, please re-open the issue @KayakFisher205 .

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

3 participants