ByteScout PDF Extractor SDK - VB6 - Split PDF - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF Extractor SDK – VB6 – Split PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VB6 – Split PDF

How to split PDF in VB6 using ByteScout PDF Extractor SDK

This code in VB6 shows how to split PDF with this how to tutorial

The coding tutorials are designed to help you test the features without need to write your own code. ByteScout PDF Extractor SDK is the Software Development Kit (SDK) that is designed to help developers with data extraction from unstructured documents like pdf, tiff, scans, images, scanned and electronic forms. The library is powered by OCR, computer vision and AI to provide unique functionality like table detection, automatic table structure extraction, data restoration, data restructuring and reconstruction. Supports PDF, TIFF, PNG, JPG images as input and can output CSV, XML, JSON formatted data. Includes full set of utilities like pdf splitter, pdf merger, searchable pdf maker and you can use it to split PDF with VB6.

This rich sample source code in VB6 for ByteScout PDF Extractor SDK includes the number of functions and options you should do calling the API to split PDF. This VB6 sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Detailed tutorials and documentation are available along with installed ByteScout PDF Extractor SDK if you’d like to dive deeper into the topic and the details of the API.

You can download free trial version of ByteScout PDF Extractor SDK from our website to see and try many others source code samples for VB6.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Form1.frm
      
VERSION 5.00 Begin VB.Form Form1 Caption = "Split PDF" ClientHeight = 1095 ClientLeft = 120 ClientTop = 465 ClientWidth = 3675 LinkTopic = "Form1" ScaleHeight = 1095 ScaleWidth = 3675 StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmd_split_pdf Caption = "Split PDF" Height = 855 Left = 120 TabIndex = 0 Top = 120 Width = 3495 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub cmd_split_pdf_Click() ' Hanlde Error On Error GoTo ErrorHandler: ' Create Bytescout.PDFExtractor.DocumentSplitter object Set splitter = CreateObject("Bytescout.PDFExtractor.DocumentSplitter") ' Set Registration name and key splitter.RegistrationName = "demo" splitter.RegistrationKey = "demo" ' Set input file inputFile = "sample.pdf" ' Enable splitting parts optimization (remove unused resources) splitter.OptimizeSplittedDocuments = True ' Extract a single page: ' ====================== splitter.ExtractPage inputFile, "page3.pdf", 3 ' (!) Note: page number is 1-based. MsgBox "Extracted page #3 to file 'page3.pdf'.", vbInformation, "Success" ' Split in two parts: ' =================== splitter.Split inputFile, "part1.pdf", "part2.pdf", 3 ' (!) Note: page number is 1-based. MsgBox "Splitted at page #3 to files 'part1.pdf' and 'part2.pdf'.", vbInformation, "Success" ' Split by ranges: ' ================ ' SplitCOM() returns array with file names. Files are saved to the system temporary directory. Dim outFiles outFiles = splitter.SplitCOM(inputFile, "1-3,4-") ' (!) Note: page numbers are 1-based; the ending "-" means "to the end". Dim fileNames For Each of In outFiles fileNames = fileNames & of & vbCrLf Next MsgBox "Splitted by ranges to files: " & vbCrLf & fileNames, vbInformation, "Success" ' Close form Unload Me ErrorHandler: If Err.Number <> 0 Then MsgBox Err.Description, vbInformation, "Error" End If End Sub

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Split_PDF.vbp
      
Type=Exe Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automation Reference=*\G{F1D62CEE-68AA-4F38-9DB0-8021C13255D8}#9.1#0#..\..\..\..\..\..\..\..\..\WINDOWS\SYSWOW64\Bytescout.PDFRenderer.tlb#ByteScout PDF Renderer SDK [TRIAL] Form=Form1.frm Startup="Form1" Command32="" Name="SplitPDF" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="Hiren" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next