ByteScout Premium Suite - VBScript - Split pdf document with pdf extractor sdk - 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 Premium Suite – VBScript – Split pdf document with pdf extractor sdk

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

How to split pdf document with pdf extractor sdk in VBScript and ByteScout Premium Suite

How to write a robust code in VBScript to split pdf document with pdf extractor sdk with this step-by-step tutorial

Sample source code below will display you how to manage a complex task like split pdf document with pdf extractor sdk in VBScript. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can be applied to split pdf document with pdf extractor sdk using VBScript.

Want to quickly learn? This fast application programming interfaces of ByteScout Premium Suite for VBScript plus the guidelines and the code below will help you quickly learn how to split pdf document with pdf extractor sdk. Simply copy and paste in your VBScript project or application you and then run your app! Enjoy writing a code with ready-to-use sample VBScript codes.

All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.

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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

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

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next