XDoc.PDF
Features
Tech Specs
How-to VB.NET
Pricing
How to Start Convert PDF Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

VB.NET PDF - Create PDF from Multiple Image Forms in VB.NET


VB.NET Guide for Converting Raster Images to PDF File Using VB.NET Sample Code





Look for HTML5 PDF Editor?

EdgePDF: ASP.NET PDF Editor is the best HTML5 PDF Editor and ASP.NET PDF Viewer based on XDoc.PDF, JQuery, HTML5. It supports ASP.NET MVC and WebForms projects.


Best and professional image to PDF converter SDK for Visual Studio .NET


Able to create PDF from images in both .NET WinForms and ASP.NET application


Components to batch convert PDF documents in Visual Basic .NET class


Support create PDF from multiple image formats in VB.NET, including Jpg, Png, Bmp, Gif, Tiff, Bitmap, .NET Graphics, and REImage


.NET converter control for exporting high quality PDF from images


Turn multiple image formats into one or multiple PDF file


Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint


Crop and paste specified image area to PDF page


Source codes for evaluation in VB.NET class


Quick integrate free library in .NET framework


If you want to turn PDF file into image file format in VB.NET class, then RasterEdge PDF converting control for VB.NET can also help with this. It enables you to build a PDF file with one or more images. Various image forms are supported which include Png, Jpeg, Bmp, and Gif raster images and .NET Graphics. You can have a quick evaluation by using VB.NET programming demos illustrated below.


Furthermore, if you are a Visual C# .NET programmer, you can go to this Visual C# guide for image to PDF conversion in .NET project.




VB.NET Project: Necessary DLLs for Conversion from Image to PDF



In order to run the sample code, the following steps would be necessary.


Add necessary references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Raster.dll


  RasterEdge.XDoc.Raster.Core.dll


  RasterEdge.XDoc.PDF.dll


  System.Drawing.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using System.Drawing;


  using RasterEdge.XDoc.PDF;


Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:

       

       If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.

       

       If using x86, the platform target should be x86.




VB.NET Example of Converting Single Image file to PDF Conversion



Here, we take jpg image file as an example for converting one image to PDF in VB.NET.




Dim inputImagePath As String = "C:\demo.jpg"
' Load a jpg image file.
Dim bmp As Bitmap = New Bitmap(inputImagePath)
Dim images As List(Of Bitmap) = New List(Of Bitmap)() 
images.Add(bmp)
' Build a PDF document with jpg image.
Dim doc As PDFDocument = New PDFDocument(images.ToArray())

' Save document to a file.
Dim outputFilePath As String = "C:\output.pdf"
doc.Save(outputFilePath)





VB.NET Example of More than Two Images to PDF Conversion



This VB. NET example shows how to build a PDF document with three image files (BMP, JPEG and PNG).




' Load 3 image files (BMP, JPEG and PNG).
Dim images As New List(Of Bitmap)()
images.Add(New Bitmap("C:\1.bmp"))
images.Add(New Bitmap("C:\1.jpg"))
images.Add(New Bitmap("C:\1.png"))

' Build a PDF document with these images.
Dim doc As PDFDocument = New PDFDocument(images.ToArray())

' Save document to a file.
Dim outputFilePath As String = "C:\output.pdf"
doc.Save(outputFilePath)