File: Merge, Append PDF Files
Work with Other SDKs
File: Merge, Append PDF Files
  |  
Home ›› XDoc.PDF ›› VB.NET PDF: Merge and Append PDF

VB.NET PDF - Merge PDF Document Using VB


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




Professional adobe PDF file merging control built on Visual Studio .NET and .NET framework 2.0


Batch merge PDF documents in Visual Basic .NET class program


Merge two or several separate PDF files together and into one PDF document


Combine multiple specified PDF pages in into single one file


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


Merge PDF with fields


Merge PDF without size limitation


Append one PDF file to the end of another one


Free SDK 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.


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.



VB Project: DLLs for Merging PDF Documents



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


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.PDF;




VB.NET Demo code to Combine and Merge Multiple PDF Files into One



This part illustrates how to combine three PDF files into a new file in VB.NET application. You may also combine more PDF documents together.




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

' Combine three PDF files and output.
PDFDocument.CombineDocument(inputFilePaths, outputFilePath)





VB.NET Demo code to Append PDF Document



In addition, VB.NET users can append a PDF file to the end of a current PDF document and combine to a single PDF file.




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

' append the 2nd document
doc1.AppendDocument(doc2)

' save the document
Dim outputFilePath As String = Program.RootPath + "\\" + "Output.pdf"
doc1.Save(outputFilePath)