using IronBarCode;// Create the Aztec barcodeGeneratedBarcodeAztecCode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.Aztec);// Display the value below the barcodeAztecCode.AddBarcodeValueTextBelowBarcode();// Save as a JPG fileAztecCode.SaveAsJpeg("aztec-sample.jpg");
using IronBarCode;
// Create the Aztec barcode
GeneratedBarcode AztecCode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.Aztec);
// Display the value below the barcode
AztecCode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
AztecCode.SaveAsJpeg("aztec-sample.jpg");
ImportsIronBarCode' Create the Aztec barcodeDimAztecCodeAsGeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.Aztec)' Display the value below the barcodeAztecCode.AddBarcodeValueTextBelowBarcode()' Save as a JPG fileAztecCode.SaveAsJpeg("aztec-sample.jpg")
Imports IronBarCode
' Create the Aztec barcode
Dim AztecCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.Aztec)
' Display the value below the barcode
AztecCode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
AztecCode.SaveAsJpeg("aztec-sample.jpg")
輸出
如何建立用於工業零件標記的 DataMatrix BARCODE?
Data Matrix 是一種緊湊的 2D 矩陣,其邊緣的 L 形定位圖案是識別其特徵的關鍵。 此格式特別適用於空間有限且耐用性至關重要的情境。
Data Matrix 的獨特優勢在於其極高的耐用性,以及能夠縮小至微米級尺寸以進行直接零件標記 (DPM)。 此技術常應用於手術器械、電子元件及航太零件等空間極度受限的工業追蹤領域。 此格式體積小巧且資料密度高,非常適合用於將各類資料型別(包括序號和批次碼)轉為BARCODE。
using IronBarCode;// Create the DataMatrix barcodeGeneratedBarcodeDataMatrix = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.DataMatrix);// Display the value below the barcodeDataMatrix.AddBarcodeValueTextBelowBarcode();// Save as a JPG fileDataMatrix.SaveAsJpeg("dataMatrix-sample.jpg");
using IronBarCode;
// Create the DataMatrix barcode
GeneratedBarcode DataMatrix = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.DataMatrix);
// Display the value below the barcode
DataMatrix.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
DataMatrix.SaveAsJpeg("dataMatrix-sample.jpg");
ImportsIronBarCode' Create the DataMatrix barcodeDimDataMatrixAsGeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.DataMatrix)' Display the value below the barcodeDataMatrix.AddBarcodeValueTextBelowBarcode()' Save as a JPG fileDataMatrix.SaveAsJpeg("dataMatrix-sample.jpg")
Imports IronBarCode
' Create the DataMatrix barcode
Dim DataMatrix As GeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.DataMatrix)
' Display the value below the barcode
DataMatrix.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
DataMatrix.SaveAsJpeg("dataMatrix-sample.jpg")
using IronBarCode;// Create the MaxiCode barcodeGeneratedBarcodeMaxiCode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.MaxiCode);// Display the value below the barcodeMaxiCode.AddBarcodeValueTextBelowBarcode();// Save as a JPG fileMaxiCode.SaveAsJpeg("maxiCode-sample.jpg");
using IronBarCode;
// Create the MaxiCode barcode
GeneratedBarcode MaxiCode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.MaxiCode);
// Display the value below the barcode
MaxiCode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
MaxiCode.SaveAsJpeg("maxiCode-sample.jpg");
ImportsIronBarCode' Create the MaxiCode barcodeDimMaxiCodeAsGeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.MaxiCode)' Display the value below the barcodeMaxiCode.AddBarcodeValueTextBelowBarcode()' Save as a JPG fileMaxiCode.SaveAsJpeg("maxiCode-sample.jpg")
Imports IronBarCode
' Create the MaxiCode barcode
Dim MaxiCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.MaxiCode)
' Display the value below the barcode
MaxiCode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
MaxiCode.SaveAsJpeg("maxiCode-sample.jpg")
using IronBarCode;// Create PDF417 barcodeGeneratedBarcodePDF417code = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.PDF417);// Display the value below the barcodePDF417code.AddBarcodeValueTextBelowBarcode();// Save as a JPG filePDF417code.SaveAsJpeg("pdf417-sample.jpg");
using IronBarCode;
// Create PDF417 barcode
GeneratedBarcode PDF417code = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.PDF417);
// Display the value below the barcode
PDF417code.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
PDF417code.SaveAsJpeg("pdf417-sample.jpg");
ImportsIronBarCode' Create PDF417 barcodeDimPDF417codeAsGeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.PDF417)' Display the value below the barcodePDF417code.AddBarcodeValueTextBelowBarcode()' Save as a JPG filePDF417code.SaveAsJpeg("pdf417-sample.jpg")
Imports IronBarCode
' Create PDF417 barcode
Dim PDF417code As GeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.PDF417)
' Display the value below the barcode
PDF417code.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
PDF417code.SaveAsJpeg("pdf417-sample.jpg")
輸出
如何為行銷活動建立 QR 碼?
QR 碼是一種高密度二維矩陣,其特徵在於四個角落各有三個獨特的方形定位圖案。 作為最廣為人知的 2D BARCODE 格式,QR 碼已在消費性應用中無所不在。
QR 碼的獨特優勢在於其普羅大眾皆可使用——它是唯一一種幾乎所有現代智慧型手機相機應用程式都能原生支援的二維條碼,無需額外安裝軟體。 它通常用於行銷與公眾互動、連結至網站和數位選單,以及促進行動支付。 若需進階的 QR 碼生成功能,請參閱我們的 QR 碼建立範例。
程式碼
IronBarcode 讓生成 QR 碼變得簡單:在呼叫 Create 方法時,將 BarcodeEncoding.QRCode 作為第二個參數傳入,然後將其匯出為圖片。 您亦可透過新增標誌及變更顏色來自訂 QR 碼樣式。
using IronBarCode;// Create QR CodeGeneratedBarcodeQRcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.QRCode);// Display the value below the barcodeQRcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG fileQRcode.SaveAsJpeg("QRcode.jpg");
using IronBarCode;
// Create QR Code
GeneratedBarcode QRcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.QRCode);
// Display the value below the barcode
QRcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
QRcode.SaveAsJpeg("QRcode.jpg");
ImportsIronBarCode' Create QR CodeDimQRcodeAsGeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.QRCode)' Display the value below the barcodeQRcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG fileQRcode.SaveAsJpeg("QRcode.jpg")
Imports IronBarCode
' Create QR Code
Dim QRcode As GeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.QRCode)
' Display the value below the barcode
QRcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
QRcode.SaveAsJpeg("QRcode.jpg")
輸出
如何為小型電子產品製作微型 QR 碼?
微型 QR 碼是一種微型化的二維矩陣,其特徵在於左上角的單一正方形定位圖案。 此格式專為空間極度有限的應用場景所設計。
由於篇幅有限,字數需受限制。 最大版本號(M4)最多可包含 21 個英數字元或 35 個數字。 使用微型 QR 碼時,請仔細規劃您的資料編碼策略。
using IronBarCode;// Create a Micro QR CodeGeneratedBarcode microQRcode = BarcodeWriter.CreateBarcode("IRON-1234", BarcodeEncoding.MicroQRCode);// Display the value below the barcodemicroQRcode.AddBarcodeValueTextBelowBarcode();// Save to file as JpegmicroQRcode.SaveAsJpeg("microQRCode.jpg");
using IronBarCode;
// Create a Micro QR Code
GeneratedBarcode microQRcode = BarcodeWriter.CreateBarcode("IRON-1234", BarcodeEncoding.MicroQRCode);
// Display the value below the barcode
microQRcode.AddBarcodeValueTextBelowBarcode();
// Save to file as Jpeg
microQRcode.SaveAsJpeg("microQRCode.jpg");
ImportsIronBarCode' Create a Micro QR CodeDim microQRcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode("IRON-1234", BarcodeEncoding.MicroQRCode)' Display the value below the barcodemicroQRcode.AddBarcodeValueTextBelowBarcode()' Save to file as JpegmicroQRcode.SaveAsJpeg("microQRCode.jpg")
Imports IronBarCode
' Create a Micro QR Code
Dim microQRcode As GeneratedBarcode = BarcodeWriter.CreateBarcode("IRON-1234", BarcodeEncoding.MicroQRCode)
' Display the value below the barcode
microQRcode.AddBarcodeValueTextBelowBarcode()
' Save to file as Jpeg
microQRcode.SaveAsJpeg("microQRCode.jpg")
using IronBarCode;// Create a RmQR CodeGeneratedBarcode rMqrCode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.RMQRCode);// Display the value below the barcoderMqrCode.AddBarcodeValueTextBelowBarcode();// Save to file as JpegrMqrCode.SaveAsJpeg("rmQRcode.jpg");
using IronBarCode;
// Create a RmQR Code
GeneratedBarcode rMqrCode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.RMQRCode);
// Display the value below the barcode
rMqrCode.AddBarcodeValueTextBelowBarcode();
// Save to file as Jpeg
rMqrCode.SaveAsJpeg("rmQRcode.jpg");
ImportsIronBarCode' Create a RMQR CodeDim rMqrCode AsGeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.RMQRCode)' Display the value below the barcoderMqrCode.AddBarcodeValueTextBelowBarcode()' Save to file as JpegrMqrCode.SaveAsJpeg("rmQRcode.jpg")
Imports IronBarCode
' Create a RMQR Code
Dim rMqrCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.RMQRCode)
' Display the value below the barcode
rMqrCode.AddBarcodeValueTextBelowBarcode()
' Save to file as Jpeg
rMqrCode.SaveAsJpeg("rmQRcode.jpg")
How do I choose the right 2D barcode format with IronBarcode?
Choosing the right 2D barcode with IronBarcode involves understanding each format's strengths. Aztec is great for mobile screens, DataMatrix for industrial marking, QR for consumer use, and so on. IronBarcode supports all these, offering customization for specific needs.
What makes 2D barcodes generated by IronBarcode reliable?
IronBarcode equips 2D barcodes with built-in error correction, maintaining data accessibility even if the barcode is damaged. This feature, alongside the capacity to store large amounts of data, makes them reliable for fast-paced and mobile scanning environments.