PDF to Image - pqScan.com
C# Guide for Appending Image to PDF Adding and Appending Image to PDF Document in C#.NET Programming Online Demo Download Trial Purchase Now
C#.NET
VB.NET

How to Append Image to PDF in C# .NET?

back to home  >  .NET Image to PDF SDK  >  How to Convert Image to PDF in .NET  >  Add and Append Image to PDF Document

If you already have an Adobe PDF document with information in it, and then you want to add some new image or picture information to this PDF file, pqScan Image to PDF Library in .NET is a wonderful choice.

As an easy to use programming library for C#, pqScan .NET Image to PDF Converter allows you to add and append one or more images/pictures to an existed PDF file in Visual Studio C# .NET projects. There is no need for extra PDF software or complicated programming code. Just call the method "AppendToPDF(string[] imageFiles, string pdfFile)", and everything will be done quickly under the control of our converter SDK.

Append Image to PDF - C# Coding Example

Now, let's see how to append (TIFF/TIF) images to PDF document in C# class application. This example shows the way of adding and merging images to PDF file that is loaded from local file. In general, you can merge and append one image or multiple images to PDF file at a time.

using System;
using PQScan.ImageToPDF;

namespace AppendImageToPDF
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create an instance of PQScan.ImageToPDF.PDFConverter object.
            PDFConverter converter = new PDFConverter();
            
            // Choose PDF page layout. A4 is the most widely used layout.
            converter.PageSizeType = PageSizeMode.A4;

            // Set input Tiff images (with single page) from local files.
            string[] imgFiles = new string[3] { "append1.tif", "append2.tif" , "append3.tif"  };            

            // Name the output PDF file.
            string outFile = "merge-image-to-pdf.pdf";

            // Append Tiff images to PDF document.
            converter.AppendToPDF(imgFiles, outFile);
        }
    }
}

The C# class coding example above introduces how to add image from local disk to PDF file. Sometimes, source images may be in stream. So here, we also provide a solution for appending (BMP) image from stream to PDF document using C#.NET.

using System;
using System.IO;
using PQScan.ImageToPDF;

namespace AppendImageToPDF
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create an instance of PQScan.ImageToPDF.PDFConverter object.
            PDFConverter converter = new PDFConverter();

            // Select PDF page layout. If ImageSize is selected, 
            // PDF page will retain source image size with original quality.
            converter.PageSizeType = PageSizeMode.ImageSize;

            // Set input BMP images from file streams.
            FileStream[] streams = new FileStream[3];
            streams[0] = new FileStream("append1.bmp", FileMode.Open);
            streams[1] = new FileStream("append2.bmp", FileMode.Open);
            streams[2] = new FileStream("append3.bmp", FileMode.Open);  

            // Set output PDF file name.
            string outFile = "merge-image-to-pdf.pdf";

            // Append BMP images to PDF.
            converter.AppendToPDF(streams, outFile);
        }
    }
}

add image(jpg, png, tiff, bitmap, gif) into pdf in c#

Image to PDF Image to PDF in C# Tiff to PDF in C# Mixed Type to PDF in C#
Tool like pqScan .NET Image to PDF enables us to quickly convert image to PDF file. It's kind of product that we're looking for, which is taking our business a different level. Jonas Noah