C# Barcode Generator Library
How to generate barcode to multi pages TIFF file?
How to create, add barcode to multi-page TIFF document in C# ASP.NET Core, MVC, WinForms, WPF apps?
How to create barcode to multi-page TIFF using C#?
The C# sample code below explains how to create, add QR Code barcode image to an existing multi-page TIFF file using C#.NET.
- Create a new QR Code barcode object, and set the QR Code data text.
- Customize QR Code barcode dpi, barcode image width and height options
- Create a new TIFFDocument object from an existing multi-page TIFF file
- Get a TIFFPage object from the first page of the tiff file
- Generate and insert QR Code on the TIFFPage object on the specified region
- Save the TIFF file with barcode inserted
QRCode barcode = new QRCode();
barcode.Data = "https://www.rasteredge.com";
barcode.AutoResize = true;
barcode.Resolution = 96;
barcode.UOM = UnitOfMeasure.INCH;
barcode.BarcodeWidth = 1.5f;
barcode.BarcodeHeight = 1.5f;
String inputFilePath = @"C:\Input\RasterEdge.com\test-document.tiff";
String outputFilePath = @"C:\Output\RasterEdge.com\barcode-qrcode-tiff.tiff";
TIFFDocument doc = new TIFFDocument(inputFilePath);
// Draw the barcode at position (100, 200) in pixels on the 1st page.
TIFFPage page = (TIFFPage)doc.GetPage(0);
barcode.DrawBarcode(page, 120, 200);
doc.Save(outputFilePath);