using IronBarCode;// Create a basic barcodeBarcodeWriter.CreateBarcode("IronBarcode123", BarcodeEncoding.Code128, 200, 100).SaveAsJpeg("OneDBarcode.jpeg");// Create a barcode with custom optionsvar myBarcode = BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeEncoding.Code128, 300, 150);// Apply stylingmyBarcode.AddBarcodeValueTextBelowBarcode();myBarcode.SetMargins(10);// Save in multiple formatsmyBarcode.SaveAsJpeg("product-barcode.jpg");myBarcode.SaveAsPng("product-barcode.png");
using IronBarCode;
// Create a basic barcode
BarcodeWriter.CreateBarcode("IronBarcode123", BarcodeEncoding.Code128, 200, 100).SaveAsJpeg("OneDBarcode.jpeg");
// Create a barcode with custom options
var myBarcode = BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeEncoding.Code128, 300, 150);
// Apply styling
myBarcode.AddBarcodeValueTextBelowBarcode();
myBarcode.SetMargins(10);
// Save in multiple formats
myBarcode.SaveAsJpeg("product-barcode.jpg");
myBarcode.SaveAsPng("product-barcode.png");
ImportsIronBarCode' Create a basic barcodeBarcodeWriter.CreateBarcode("IronBarcode123", BarcodeEncoding.Code128, 200, 100).SaveAsJpeg("OneDBarcode.jpeg")' Create a barcode with custom optionsDim myBarcode = BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeEncoding.Code128, 300, 150)' Apply stylingmyBarcode.AddBarcodeValueTextBelowBarcode()myBarcode.SetMargins(10)' Save in multiple formatsmyBarcode.SaveAsJpeg("product-barcode.jpg")myBarcode.SaveAsPng("product-barcode.png")
Imports IronBarCode
' Create a basic barcode
BarcodeWriter.CreateBarcode("IronBarcode123", BarcodeEncoding.Code128, 200, 100).SaveAsJpeg("OneDBarcode.jpeg")
' Create a barcode with custom options
Dim myBarcode = BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeEncoding.Code128, 300, 150)
' Apply styling
myBarcode.AddBarcodeValueTextBelowBarcode()
myBarcode.SetMargins(10)
' Save in multiple formats
myBarcode.SaveAsJpeg("product-barcode.jpg")
myBarcode.SaveAsPng("product-barcode.png")
using IronBarCode;// Basic QR code creationQRCodeWriter.CreateQrCode("IronBarcode1234", 250, QRCodeWriter.QrErrorCorrectionLevel.Medium, qrVersion: 0).SaveAsJpeg("QRMedium.jpeg");// Advanced QR code with logo and custom stylingvar qrCode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com", new QRCodeLogo("logo.png"), 500);// Apply stylingqrCode.ChangeBarCodeColor(System.Drawing.Color.DarkBlue);// Save in multiple formatsqrCode.SaveAsPng("styled-qr.png");qrCode.SaveAsPdf("styled-qr.pdf");
using IronBarCode;
// Basic QR code creation
QRCodeWriter.CreateQrCode("IronBarcode1234", 250, QRCodeWriter.QrErrorCorrectionLevel.Medium, qrVersion: 0).SaveAsJpeg("QRMedium.jpeg");
// Advanced QR code with logo and custom styling
var qrCode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com", new QRCodeLogo("logo.png"), 500);
// Apply styling
qrCode.ChangeBarCodeColor(System.Drawing.Color.DarkBlue);
// Save in multiple formats
qrCode.SaveAsPng("styled-qr.png");
qrCode.SaveAsPdf("styled-qr.pdf");
What are the capabilities of QR codes generated using IronBarcode?
The QR codes generated by IronBarcode can store a variety of data types such as URLs, text, binary data, and structured data like vCards or WiFi credentials. They offer flexibility and customization for diverse applications.
How can I customize the appearance of barcode images with IronBarcode?
IronBarcode provides customization options like changing colors, adjusting margins, and applying text below the barcode. Additionally, you can embed logos within QR codes for branding purposes.
Why is it important to choose the correct image format for barcode generation?
Choosing the right image format ensures optimal quality for specific uses. For instance, PNG is best for web display, TIFF for archival purposes, and JPEG for general use. Proper format selection promotes reliable scanning and data integrity.
What best practices should I follow when generating barcode images with IronBarcode?
Best practices include choosing the right image format, testing barcodes with multiple scanners, setting proper margins, and considering performance needs by leveraging async and multithreading techniques for high-volume generation.