VB.NET PDF - Split PDF Document Using VB.NET
VB.NET PDF Document Splitter Control to Disassemble PDF Document in Visual Basic .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 splitting SDK for Visual Studio and .NET framework 2.0
Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint
Split PDF file into two or multiple files in ASP.NET webpage online
Support to break a large PDF file into smaller files in .NET WinForms
Separate source PDF document file by defined page range in VB.NET class application
Divide PDF file into multiple files by outputting PDF file size
Split PDF document by PDF bookmark and outlines in VB.NET
Independent component for splitting PDF document in preview without using external PDF control
Provide free .NET library download and online Visual Basic .NET class source codes
How to split & disassemble source PDF document file in VB.NET class application? The VB.NET PDF document splitter control provides VB.NET developers an easy to use solution that they can split target multi-page PDF document file to one-page PDF files or they can separate source PDF file to smaller PDF documents by every given number of pages. This online VB tutorial aims to illustrate the process of PDF document splitting.
VB.NET PDF Splitting & Disassembling DLLs
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;
Split PDF File by Number of Pages Demo Code in VB.NET
This is an VB.NET example of splitting a PDF file into multiple ones by number of pages.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
'set split option
Dim options As SplitOptions = New SplitOptions(SplitMode.ByPage)
' limit the pages of each file to 8 pages
options.MaxPages = 8
' set output option
Dim outputOps As SplitOutputOptions = New SplitOutputOptions()
outputOps.OutputFolder = Program.RootPath
outputOps.Mode = 2
outputOps.Label = "Part"
outputOps.Separator = "_"
' split a PDF file with options
PDFDocument.SplitDocument(inputFilePath, options, outputOps)
|
Split PDF File by Output File Size Demo Code in VB.NET
This VB.NET sample codes explain how to split a PDF file into multiple ones by output PDF file size.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
' set split option
Dim options As SplitOptions = New SplitOptions(SplitMode.BySize)
' limit the size of each file to 0.1M bytes
options.MaxSize = 0.1F
' set output option
Dim outputOps As SplitOutputOptions = New SplitOutputOptions()
outputOps.OutputFolder = Program.RootPath
outputOps.Mode = 2
outputOps.Label = "Part"
outputOps.Separator = "_"
' split a PDF file with options
PDFDocument.SplitDocument(inputFilePath, options, outputOps)
|
Split PDF File by Top Level Bookmarks Demo Code in VB.NET
The following VB.NET codes explain how to split a PDF file into multiple ones by PDF bookmarks or outlines.
Dim inputFilePath As String = Program.RootPath + "\\" + "2.pdf"
' set split option
Dim options As SplitOptions = New SplitOptions(SplitMode.ByBookMark)
' set output option
Dim outputOps As SplitOutputOptions = New SplitOutputOptions()
outputOps.OutputFolder = Program.RootPath
outputOps.Mode = 2
outputOps.Label = "Part"
outputOps.Separator = "_"
'split a PDF file with options
PDFDocument.SplitDocument(inputFilePath, options, outputOps)
|
Divide PDF File into Two Demo Code Using VB.NET
This is an VB.NET example of splitting a PDF to two new PDF files.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
' set split option
Dim options As SplitOptions = New SplitOptions(SplitMode.ByPage)
' limit the pages of each file to 8 pages
options.MaxPages = 8
' set output option
Dim outputOps As SplitOutputOptions = New SplitOutputOptions()
outputOps.OutputFolder = Program.RootPath
outputOps.Mode = 2
outputOps.Label = "Part"
outputOps.Separator = "_"
' split a PDF file with options
PDFDocument.SplitDocument(inputFilePath, options, outputOps)
|
Split PDF Document into Multiple PDF Files Demo Code in VB.NET
You can use the following VB.NET demo to split PDF document to four files.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim outputFileName As String = "Output"
Dim splitIndex = New Integer() {1, 3, 5} ' Valid value for each index: 1 to (Page Count - 1).
' Create output PDF file path list
Dim outputFilePaths As New List(Of String)
Dim i As Integer
For i = 0 To splitIndex.Length
outputFilePaths.Add(Program.RootPath + "\\" + outputFileName + "_" + i.ToString() + ".pdf")
Next
' Split input PDF file to 4 files:
' File 0: page 0.
' File 1: page 1 ~ 2.
' File 2: page 3 ~ 4.
' File 3: page 5 ~ the last page.
PDFDocument.SplitDocument(inputFilePath, splitIndex, outputFilePaths.ToArray())
|