PDF to Image - pqScan.com
C# Convert Mixed Type of Images to PDF Follow This Guide to Change Two or More Images Types to PDF Document Online Demo Download Trial Purchase Now
C#.NET
VB.NET

How to Convert Mixed Type of Images to PDF in C# .NET?

back to home  >  .NET Image to PDF SDK  >  How to Convert Image to PDF in .NET  >  C# Tutorial for Converting Blended Images to PDF File

As for converting image or picture to PDF document in C# programming, a single type of image file conversion may not satisfy your application needs. Creating a PDF from mixed type of image files may be requested, such as conversion from Jpeg and Png to PDF, or from Bmp and Tiff to PDF.

Fortunately, pqScan Image to PDF SDK in .NET is just custom-built software that can do these for you. This image to PDF file converter library enables C# users to render and convert one type of image/picture, two, three or more types of image files to Adobe PDF document. Moreover, appending and merging multiple types of images to PDF document in C# is also supported. And you do not need to consider the compatibility of each image file format. Our DLL library will do this for you.

Mixed Images to PDF Conversion Using C#

After adding PQScan.ImageToPDF.dll library to your C# programming project as reference, you may directly use the following C# sample code to convert and transform mixed type images to Adobe PDF file. In this example, two types of raster images Jpeg and Bmp are included. By debugging your project, these two image files will be rendered to create a new PDF document.

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

            // Define PDF page layout. A4 is the most commonly used one.
            converter.PageSizeType = PageSizeMode.A4;

            // Set Jpeg and Bmp image types as input files.
            string[] imgFiles = newstring[2] { "input1.jpg", "input2.bmp" };

            // Give a name to output PDF document.
            string outFile = "mixed-type.pdf";

            // Convert to PDF from these two mixed image types.
            converter.CreatePDF(imgFiles, outFile);
        }
    }
}

Appending Mixed Images to PDF Using C#

Of course, pqScan Image to PDF Converter Control for .NET also allows you to append and merge multiple types of images to PDF document. In this C# sample, we will introduce you how to add three types of raster images (Tiff, Png, and Gif formats) and merge them into PDF document using the following Visual C# code.

using System;
using PQScan.ImageToPDF;

namespace AppendMixedTypeImageToPDF
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create an instance of PQScan.ImageToPDF.PDFConverter object.
            PDFConverter converter = new PDFConverter();
            
            // Customize PDF pages layout. If set to ImageSize, 
            // PDF pages will has the original size and quality of source images.
            converter.PageSizeType = PageSizeMode.ImageSize;

            // Define mixed image types: Tiff, Png and Gif.
            string[] imgFiles = new string[3] { "input1.tif", "input2.png" , "input3.gif"  };            

            // Customize output PDF file name.
            string outFile = "append-to-existed.pdf";

            // Append and merge these three types of image files to PDF.
            converter.AppendToPDF(imgFiles, outFile);
        }
    }
}
Image to PDF Image to PDF in C# Append to PDF in C# Tiff to PDF in C#
This product, absolutely, the most robust and reliable one I've tested. I would recommend it to anyone looking for professional image to pdf conversion toolkit. Keep up providing amazing products! Patrick Wayne