Guide for VB.NET
Core Document Formats
Merge or Split PDF File(s)
Additional Features

VB.NET PDF - How to Merge and Split PDF

How to Merge and Split PDF Documents by Using VB.NET Code

VB.NET
Home > .NET Imaging SDK > VB.NET > Merge and Split Document(s)

"This online guide content is Out Dated!
    Please get the latest XDoc.PDF C# Developer Guide here.
"

VB.NET PDF Merging & Splitting Guide Summary
To merge or split PDF documents, you can choose our VB.NET PDF Processing Add-On. We provide this detailed guide to help your merge two or more PDF documents or split a PDF document into two sub-documents in VB.NET applications. APIs and VB.NET demo codes for merging and splitting Microsoft PDF documents are offered on this guide page. In the end of this guide page, you will find detailed information on .NET environments for using this PDF Add-On. Welcome to download the free trial version of our VB.NET PDF Processing Add-On and refer to this guide page to easily and quickly complete your PDF documents merging and splitting.
Apart from merging or splitting PDF documents, this VB.NET PDF Processing Add-On is also a professional component for modifying PDF document page (including adding new page into PDF document, deleting unnecessary page from target PDF document and rearranging the order of your PDF document pages) and extracting pages from PDF document through VB.NET programming. Our VB.NET PDF Processing Add-On is used by many VB.NET developers due to its high quality and independence. Using this Add-On, you are able to finish PDF document page processing in VB.NET application without the help of any external assembly.
VB.NET PDF Documents Merging & Splitting APIs
In this section, we provide you with APIs used for calling methods of merging two or multiple PDF documents and splitting a single PDF document in VB.NET program. In the following APIs, you will find the PDFDocument class. PDFDocument is an abstraction your PDF document in the VB.NET program and it includes all pages information in the PDF document. The PDFDocument is derived from the super class REDocument and you can create a new PDFDocument object of blank page(s).

APIs for Merging PDF Documents in VB.NET

Private Sub Combine(source As List(Of BaseDocument), destn As Stream) Implements PDFDocument.Combine
End Sub
Private Sub Combine(source As List(Of BaseDocument), destn As [String]) Implements PDFDocument.Combine
End Sub
Private Sub Combine(source As List(Of [String]), destn As Stream) Implements PDFDocument.Combine
End Sub
Private Sub Combine(source As List(Of [String]), destn As [String]) Implements PDFDocument.Combine
End Sub

APIs for Splitting PDF document in VB Class

Private Sub SplitDocument(source As Stream, index As Integer, destns As List(Of [String])) Implements PDFDocument.SplitDocument
End Sub
Private Sub SplitDocument(source As [String], index As Integer, destns As List(Of [String])) Implements PDFDocument.SplitDocument
End Sub
Private Sub SplitDocument(source As Stream, index As Integer, destns As List(Of Stream)) Implements PDFDocument.SplitDocument
End Sub
Private Sub SplitDocument(index As Integer, source As [String], destns As List(Of Stream)) Implements PDFDocument.SplitDocument
End Sub
VB.NET PDF Documents Merging & Splitting Codes

VB.NET Sample Code for Merging PDF Documents

VB.NET sample code below is designed to merge multiple Microsoft PDF documents and then save the merged document to stream. If the PDF document is saved to a memory stream, you can use it in further applications when necessary.
Public Sub CombineDocumentsToStream(s As Stream, docList As List(Of BaseDocument))
PDFDocument.Combine(docList, s)
End Sub
If you want to merge your PDF document and save the document merged from multiple documents as a new PDF file, you may use the following demo code. After you save the PDF document to local file, you are able to open and view the PDF document at any time. You can also load the PDF document from your local file to website for other applications.
Public Sub CombineDocumentAndSaveItToFile(docList As List(Of BaseDocument), destFilePath As [String])
PDFDocument.Combine(docList, destFilePath)
End Sub

VB.NET Demo Code for Splitting PDF Document

The following demo code can be used to split your source PDF document file into two sub-documents at the page index you have specified in .NET application using VB language. For example, if you want to split the PDF document from the forth page of your PDF document, you just need to set the page index to 3. Then, The first four pages (Note: there is a page 0 before page 1 in our program) will form a new document and the remained pages will form the other document.
Public Sub splitPDFDocument(sourceFilePath As [String], pageIdx As Integer, destnsPath As List(Of [String]))
PDFDocument.SplitDocument(sourceFilePath, pageIdx, destnsPath)
End Sub
Note: In order to use our VB.NET PDF Processing Add-On to merge or split Microsoft PDF documents in VB.NET class, you may need to know about the .NET environments below for applying this Add-On.
  • .NET Framework 2.0, 3.0, 3.5, 4.0 or 4.5
  • Visual Studio 2005, 2008, 2010 or 2012
  • Such operating systems as Windows 7, Windows XP and Windows Server 2003


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com