ByteScout Premium Suite - VBScript - Extract images by page from pdf with pdf extractor sdk - ByteScout

ByteScout Premium Suite – VBScript – Extract images by page from pdf with pdf extractor sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VBScript – Extract images by page from pdf with pdf extractor sdk

How to extract images by page from pdf with pdf extractor sdk in VBScript using ByteScout Premium Suite

How to write a robust code in VBScript to extract images by page from pdf with pdf extractor sdk with this step-by-step tutorial

This sample source code below will display you how to extract images by page from pdf with pdf extractor sdk in VBScript. Want to extract images by page from pdf with pdf extractor sdk in your VBScript app? ByteScout Premium Suite is designed for it. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

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 extract images by page from pdf with pdf extractor sdk. IF you want to implement the functionality, just copy and paste this code for VBScript below into your code editor with your app, compile and run your application. Check VBScript sample code samples to see if they respond to your needs and requirements for the project.

You can download free trial version of ByteScout Premium Suite from our website to see and try many others source code samples for VBScript.

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

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

ExtractImagesByPages.vbs
      
' Create Bytescout.PDFExtractor.ImageExtractor object Set extractor = CreateObject("Bytescout.PDFExtractor.ImageExtractor") extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile("..\..\sample1.pdf") ' Get page count pageCount = extractor.GetPageCount() ' Extract images from each page For i = 0 To pageCount - 1 j = 0 ' Initialize page images enumeration If extractor.GetFirstPageImage(i) Then Do outputFileName = "page" & i & "image" & j & ".png" ' Save image to file extractor.SaveCurrentImageToFile outputFileName j = j + 1 Loop While extractor.GetNextImage() ' Advance image enumeration End If Next ' Open first output file in default associated application Set shell = CreateObject("WScript.Shell") shell.Run "page0image0.png", 1, false Set shell = Nothing Set extractor = Nothing

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