ByteScout PDF Extractor SDK - VBScript - Split PDF Document - ByteScout

ByteScout PDF Extractor SDK – VBScript – Split PDF Document

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VBScript – Split PDF Document

How to split PDF document in VBScript using ByteScout PDF Extractor SDK

This code in VBScript shows how to split PDF document with this how to tutorial

The sample source code below will teach you how to split PDF document in VBScript. ByteScout PDF Extractor SDK: the SDK that helps developers to extract data from unstructured documents, pdf, images, scanned and electronic forms. Includes AI functions like automatic table detection, automatic table extraction and restructuring, text recognition and text restoration from pdf and scanned documents. Includes PDF to CSV, PDF to XML, PDF to JSON, PDF to searchable PDF functions as well as methods for low level data extraction. It can split PDF document in VBScript.

This code snippet below for ByteScout PDF Extractor SDK works best when you need to quickly split PDF document in your VBScript application. Follow the instructions from the scratch to work and copy the VBScript code. This basic programming language sample code for VBScript will do the whole work for you to split PDF document.

ByteScout PDF Extractor SDK free trial version is available on our website. VBScript and other programming languages are supported.

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

SplitPdf.vbs
      
' Create Bytescout.PDFExtractor.DocumentSplitter object Set splitter = CreateObject("Bytescout.PDFExtractor.DocumentSplitter") splitter.RegistrationName = "demo" splitter.RegistrationKey = "demo" inputFile = "..\..\sample2.pdf" ' Enable splitted parts optimization (remove unused resources) splitter.OptimizeSplittedDocuments = true ' Extract a single page: ' ====================== splitter.ExtractPage inputFile, "page3.pdf", 3 ' (!) Note: page number is 1-based. WScript.Echo "Extracted page #3 to file 'page3.pdf'." ' Split in two parts: ' =================== splitter.Split inputFile, "part1.pdf", "part2.pdf", 3 ' (!) Note: page number is 1-based. WScript.Echo "Splitted at page #3 to files 'part1.pdf' and 'part2.pdf'." ' 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 WScript.Echo "Splitted by ranges to files: " & vbCRLF & fileNames

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

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

Explore ByteScout PDF Extractor SDK Documentation

Get ByteScout PDF Extractor SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next