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 - Merge PDF Document Using VB.NET


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





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.


Professional VB.NET PDF file merging SDK support Visual Studio .NET


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.


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.NET 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)