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?



ON THIS PAGE:







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.

  1. Create a new QR Code barcode object, and set the QR Code data text.
  2. Customize QR Code barcode dpi, barcode image width and height options
  3. Create a new TIFFDocument object from an existing multi-page TIFF file
  4. Get a TIFFPage object from the first page of the tiff file
  5. Generate and insert QR Code on the TIFFPage object on the specified region
  6. 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);