ByteScout Data Extraction Suite - VBScript - Split pdf document with pdf extractor sdk - ByteScout

ByteScout Data Extraction Suite – VBScript – Split pdf document with pdf extractor sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – VBScript – Split pdf document with pdf extractor sdk

How to split pdf document with pdf extractor sdk in VBScript using ByteScout Data Extraction Suite

Learn to split pdf document with pdf extractor sdk in VBScript

The sample shows instructions and algorithm of how to split pdf document with pdf extractor sdk and how to make it run in your VBScript application. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK and you can use it to split pdf document with pdf extractor sdk with VBScript.

Want to save time? You will save a lot of time on writing and testing code as you may just take the VBScript code from ByteScout Data Extraction Suite for split pdf document with pdf extractor sdk below and use it in your application. Just copy and paste the code into your VBScript application’s code and follow the instructions. Want to see how it works with your data then code testing will allow the function to be tested and work properly.

Our website gives trial version of ByteScout Data Extraction Suite for free. It also includes documentation and source code samples.

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

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

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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite 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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next