PDF to Image - pqScan.com
VB Convert Mixed Type of Images to PDF Adding Mixed type Images to PDF document in VB.NET Online Demo Download Trial Purchase Now
C#.NET
VB.NET

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

back to home  >  Image to PDF SDK  >  How to Convert Image to PDF  >  Mixed Type of Images to PDF

Are you upset for being only able to convert one type of image to PDF document at one time? If you read this tutorial with how to create PDF from mixed type of images, you will be in a happy mood.

In this article, we will introduce you one benefit of pqScan Image to PDF SDK, having the ability to add multi-type images to PDF document. And our SDK can be integrate with .NET programming, if you create a vb.net console application, you will find it's excellent to use.

Mixed type of Images to PDF - Visual Basic sample

if you want to create a new PDF from mixed type of image(here are Tiff and Bmp at the same time), the following vb.net sample code is what you need.

Imports System.IO
Imports PQScan.ImageToPDF

Namespace MixedTypeImageToPDF
    Class Program
        Private Shared Sub Main(args As String())
            'Create an instance of PQScan.ImageToPDF.PDFConverter object.
            Dim converter As New PDFConverter()

            'Set PDF page layout, A4 is most widely used.
            converter.PageSizeType = PageSizeMode.A4

            'Set mixed image type: tiff, bmp.
            Dim imgFiles As String() = New String(1) {"input1.tiff", "input2.bmp"}

            'Set output pdf stream.
            Dim fileStream As New FileStream("mixed-type.pdf", FileMode.Create)

            'Generate PDF from images.
            converter.CreatePDF(imgFiles, fileStream)
        End Sub
    End Class
End Namespace

If you want to add mixed type of images(here are Jpeg, Gif, Png), and append them to a ready-made PDF document, the vb.net sample code below is just for you.

Imports PQScan.ImageToPDF

Namespace AppendMixedTypeImageToPDF
    Class Program
        Private Shared Sub Main(args As String())
            'Create an instance of PQScan.ImageToPDF.PDFConverter object.
            Dim converter As PDFConverter = newPDFConverter()

            'Set PDF page layout, if to ImageSize, 
            'PDF page will display the original size and quality of the source image
            converter.PageSizeType = PageSizeMode.ImageSize

            'Set mixed image type: jpeg, gif and png.
            Dim imgFiles As String() = New String(2) {"input1.jpeg", "input2.gif", "input3.png"}

            'Set output pdf file name.
            Dim outFile As String = "append-to-pdf.pdf"

            'Append multiple type of images to PDF.
            converter.AppendToPDF(imgFiles, outFile)
        End Sub
    End Class
End Namespace
Image to PDF Image to PDF in VB.NET Append to PDF in VB.NET TIFF to PDF in VB.NET
In a word - WOW! I'm extremely impressed with your .net file converter. What can i say? I am a fan of pqScan. By the way, i'm thankful to your support team for giving fast, professional reply! You guys are great! Sam Tucker