How to generate QRCode And save in server file path using .NetCoreMTmohaammed talha5yAsked Mar 10, 2021, 2:38 AM EST5 answersShareLinkedInXCopy linkSaveI want To generate QRCode And save in server file path as image format using .NetCore
How to generate QRCode And save in server file path using .NetCoreMTmohaammed talha5yAsked Mar 10, 2021, 2:38 AM EST5 answersShareLinkedInXCopy linkSaveI want To generate QRCode And save in server file path as image format using .NetCore
Rijwan AnsariRank #82 · 24.2K reputation5y agoPosted Mar 10, 2021, 3:46 AM EST+2Check this article. https://qawithexperts.com/article/asp-net/read-or-generate-qr-code-in-aspnet-core/325 +2
Kiran MohantyRank #821 · 2.8K reputation5y agoPosted Mar 10, 2021, 4:23 AM EST+1Hi,Try this.QRCodeGenerator _qrCode = new QRCodeGenerator(); QRCodeData _qrCodeData = _qrCode.CreateQrCode("QR code text",QRCodeGenerator.ECCLevel.Q); QRCode qrCode = new QRCode(_qrCodeData); Bitmap qrCodeImage = qrCode.GetGraphic(20); using (MemoryStream stream = new MemoryStream()) { qrCodeImage.Save(stream, System.Drawing.Imaging.ImageFormat.Png); return stream.ToArray(); } +1
SGSapna GirishRank #1,810 · 819 reputation5y agoPosted Mar 17, 2021, 2:37 AM EDT+1Try Spire.Barcode for .NET, it works for .NET code.using Spire.Barcode; using System.Drawing; namespace QRCode { class Program { static void Main(string[] args) { BarcodeSettings settings = new BarcodeSettings(); settings.Type = BarCodeType.QRCode; settings.Data = "Hello 123456789"; settings.Data2D = "Hello 123456789"; settings.QRCodeDataMode = QRCodeDataMode.AlphaNumber; settings.X = 1.0f; settings.QRCodeECL = QRCodeECL.H; BarCodeGenerator generator = new BarCodeGenerator(settings); Image image = generator.GenerateImage(); image.Save("QRCode.png"); } } } +1
Satya KarkiRank #78 · 24.6K reputation5y agoPosted Mar 17, 2021, 2:55 AM EDT+1Hi, you can check these links:https://www.freecodecamp.org/news/how-to-easily-implement-qrcoder-in-asp-net-core-using-c-10c4aa857e84/ https://dottutorials.net/generate-qr-code-asp-net-core-source-code/ +1
BTBen ThompsonRank #8,839 · 215 reputation5y agoPosted Mar 17, 2021, 9:58 AM EDT+1Hello,You can use the LEADTOOLS SDK for this. private void WriteBarcode(string value, string imageFileName) { RasterCodecs codecs = new RasterCodecs(); RasterImage image = RasterImage.Create(2550, 3300, 1, 300, RasterColor.White); BarcodeWriter writer = new BarcodeEngine().Writer; // Create the barcode data QRBarcodeData barcode = BarcodeData.CreateDefaultBarcodeData(BarcodeSymbology.QR) as QRBarcodeData; barcode.Value = value; // We will use the alignment to position the barcodes, so use all of the image barcode.Bounds = new LeadRect(0, 0, image.ImageWidth, image.ImageHeight); // Set the write options QRBarcodeWriteOptions options = new QRBarcodeWriteOptions(); options.GroupNumber = 0; options.GroupTotal = 0; options.XModule = 30; options.ECCLevel = QRBarcodeECCLevel.LevelL; // Write it Console.WriteLine("Writing barcode data: {1}", value); writer.WriteBarcode(image, barcode, options); // save to disk codecs.Save(image, imageFileName, RasterImageFormat.CcittGroup4, 1); } We have NuGet packages available for .NET Core for this functionality.https://www.leadtools.com/downloads/nuget?nuget_package=Leadtools.BarcodeThere's also a .NET Core tutorial showing how to create a barcode and save it to a file on disk.https://www.leadtools.com/help/sdk/v21/tutorials/barcode/cross-platform/dotnet-core/write-1d-and-2d-barcodes-to-an-image.html+1Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign inKnow the answer?Answer a question in the forums and earn +20 SHARP for every answer.See unanswered questionsForumsTop experts01Arun PottiAnswers in the forums20answers02Tahir AnsariAnswers in the forums5answers03Kamlesh KumarAnswers in the forums5answers04Sam HobbsAnswers in the forums4answers05Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.JoinFull leaderboard →2026DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rijwan AnsariRank #82 · 24.2K reputationPosted Mar 10, 2021, 3:46 AM EST
Kiran MohantyRank #821 · 2.8K reputationPosted Mar 10, 2021, 4:23 AM EST
Sapna GirishRank #1,810 · 819 reputationPosted Mar 17, 2021, 2:37 AM EDT
Satya KarkiRank #78 · 24.6K reputationPosted Mar 17, 2021, 2:55 AM EDT
Ben ThompsonRank #8,839 · 215 reputationPosted Mar 17, 2021, 9:58 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts