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

PDF VB.NET Library
How to merge PDF Document Using VB.NET


VB.NET Guide and Sample Codes to Merge PDF Documents in VB.NET Project





In this vb.net tutorial, you will learn how to merge, combine PDF documents using VB.NET code in Visual Studio applications.

  • Merge multiple PDF files together
  • Merge, combine PDFs from byte array, or Stream objects
  • Easy to develop in Windows Forms, WPF applications, ASP.NET using VB.NET

How to merge PDF files using Visual Basic .NET

  1. Download XDoc.PDF Merger VB.NET library
  2. Install vb library to merge PDF files
  3. Step by Step Tutorial










  • Professional VB.NET PDF file merging SDK support Visual Studio .NET
  • C# tutorial page: how to merge PDF files using C#
  • Batch merge PDF documents in Visual Basic .NET class program
  • Merge two or several separate PDF files together and into one PDF document in VB.NET
  • Combine multiple specified PDF pages in into single one file
  • Able to integrate VB.NET PDF Merging control to both .NET WinForms application and ASP.NET project
  • Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint
  • VB.NET Components to combine various scanned images to PDF, such as tiff, jpg, png, gif, bmp, etc
  • Merge Microsoft Office Word, Excel and PowerPoint data to PDF form
  • Merge PDF with byte array, fields
  • Merge PDF without size limitation
  • Append one PDF file to the end of another one in VB.NET
  • Free .NET framework library download and VB.NET online source code samples


RasterEdge PDF merging library is a mature library SDK which adds powerful Portable Document Format (PDF) editing solutions and capacities to your system for VB.NET developers. This library control can be easily installed into .NET development environment such as Microsoft Visual Studio.

asp net remove image from pdf, asp.net mvc generate pdf from view, asp.net open excel file in browser, pdf editor asp.net, pdf preview in asp net c# example, show image asp.net c#, asp.net c# pdf viewer.

When you have downloaded the RasterEdge Image SDK for .NET, you can unzip the package to find the RasterEdge.Imaging.PDF.dll in the bin folder under the root directory. We have also provided you with detailed PDF processing demo project along with sample codes, which you can find in the Demos folder under RasterEdge.Imaging.Demo directory with the file name RasterEdge.Imaging.Demo.PDF.

RasterEdge .NET Image SDK has included a variety of image and document processing library components, one of which is the PDF document editing control DLL. This library DLL can efficiently enable developers to merge two or more PDF document into one and then save as another PDF document using Visual Basic .NET programming codes.

Different from PDF document appending, which is processed by directly tagging the second PDF file to the target one, this PDF file merge function will put the two target PDF together and save as new PDF, without changing the previous two PDF documents at all. This guiding page will help you merge two or more PDF documents into a single one in a Visual Basic .NET imaging application.







Quick to merge two PDF files in VB.NET code


The following steps and VB source code explain how to merge two PDF documents using PDFDocument.MergeDocument method in Visual Basic Code.

  1. Create two new PDFDocument object from two existing PDF files.
  2. Call method PDFDocument.MergeDocument to append one PDF document to the other.
  3. Save the merged PDF file


' get PDFDocument object from one file
Dim inputFilePath1 As String = "C:\1.pdf"
Dim doc1 As PDFDocument = New PDFDocument(inputFilePath1)
' get PDFDocument object from another file
Dim inputFilePath2 As String = "C:\2.pdf"
Dim doc2 As PDFDocument = New PDFDocument(inputFilePath2)

' merge two documents to a New document
Dim newDoc As PDFDocument = doc1.MergeDocument(doc2)

' save the New document
Dim outputFilePath As String = "C:\Output.pdf"
newDoc.Save(outputFilePath)






Merge multiple PDF files together using Visual Basic .NET


The following steps and VB source code explain how to merge multiple PDF files using Visual Basic .NET.

  1. Create a String array with multiple PDF file path
  2. Use PDFDocument.CombineDocument() method to merge all PDF files, and save to a new PDF file


Dim inputFilePath1 As String = "C:\1.pdf"
Dim inputFilePath2 As String = "C:\2.pdf"
Dim inputFilePath3 As String = "C:\3.pdf"
Dim outputFilePath As String = "C:\Output.pdf"
Dim inputFilePaths As String() = New String() {inputFilePath1, inputFilePath2, inputFilePath3}
' Comebine three PDF files
PDFDocument.CombineDocument(inputFilePaths, outputFilePath)






Merge PDF files through Stream objects using VB.NET


Dim inputFilePath1 As String = "C:\1.pdf"
Dim inputFilePath2 As String = "C:\2.pdf"
Dim inputFilePath3 As String = "C:\3.pdf"
Dim outputFilePath As String = "C:\Output.pdf"
Dim inputFilePaths As String() = New String() {inputFilePath1, inputFilePath2, inputFilePath3}

Dim streams As List(Of Stream) = New List(Of Stream)
For i As Integer = 0 To 2
    streams.Add(File.Open(inputFilePaths(i), FileMode.Open, FileAccess.Read, FileShare.Read))
Next i

' Comebine three PDF files through stream
Dim outputStream As Stream = File.Open(outputFilePath, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite)
PDFDocument.CombineDocument(streams.ToArray(), outputStream)






Merge PDF files through byte array in VB.NET code


Dim inputFilePath1 As String = "C:\1.pdf"
Dim inputFilePath2 As String = "C:\2.pdf"
Dim inputFilePath3 As String = "C:\3.pdf"

' Source PDF file data bytes
Dim pdfFileDataBytes1 As Byte() = File.ReadAllBytes(inputFilePath1)
Dim pdfFileDataBytes2 As Byte() = File.ReadAllBytes(inputFilePath2)
Dim pdfFileDataBytes3 As Byte() = File.ReadAllBytes(inputFilePath3)

Dim srcDocs As PDFDocument() = New PDFDocument() {
    New PDFDocument(pdfFileDataBytes1),
    New PDFDocument(pdfFileDataBytes2),
    New PDFDocument(pdfFileDataBytes3)
}

' Combine srouce PDF files
Dim combinePDF As PDFDocument = PDFDocument.CombineDocument(srcDocs)
' Save combined PDF to data bytes
Dim outputDataBytes As Byte() = combinePDF.SaveToBytes()
' ...