ByteScout Premium Suite - VBScript - Pdf to image in command line with pdf renderer 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 – Pdf to image in command line with pdf renderer sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VBScript – Pdf to image in command line with pdf renderer sdk

pdf to image in command line with pdf renderer sdk in VBScript using ByteScout Premium Suite

How to apply ByteScout Premium Suite for pdf to image in command line with pdf renderer sdk in VBScript

Writing of the code to pdf to image in command line with pdf renderer sdk in VBScript can be done by developers of any level using ByteScout Premium Suite. ByteScout Premium Suite was created to assist pdf to image in command line with pdf renderer 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.

If you want to quickly learn then these fast application programming interfaces of ByteScout Premium Suite for VBScript plus the guideline and the VBScript code below will help you quickly learn pdf to image in command line with pdf renderer sdk. If you want to know how it works, then this VBScript sample code should be copied and pasted into your application’s code editor. Then just compile and run it. Use of ByteScout Premium Suite in VBScript is also described in the documentation included along with the product.

On our website you may get trial version of ByteScout Premium Suite for free. Source code samples are included to help you with your VBScript application.

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

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

PDF_to_Image.bat
      
@echo off REM Run VBScript through the command line REM The script convert first pages of all PDF documents in the outer folder containing sample files (..\..) REM and puts generated images to "output" sub-folder. cscript.exe "PDF_to_Image.vbs" ..\.. output pause

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

PDF_to_Image.vbs
      
if WScript.Arguments.Length < 2 Then WScript.Echo "Usage: cscript PDF_to_Image.vbs <input_folder> <output_folder>" WScript.Quit End If ' Create Bytescout.PDFRenderer.RasterRenderer object Set renderer = CreateObject("Bytescout.PDFRenderer.RasterRenderer") renderer.RegistrationName = "demo" renderer.RegistrationKey = "demo" ' Render PDF document at 96 DPI - default PC display resolution ' To get higher quality output, set 200, 300 or more Dim renderingResolution renderingResolution = 96 ' Image format: 0 - BMP; 1 - JPEG; 2 - PNG; 3 - TIFF; 4 - GIF Dim outputImageFormat outputImageFormat = 2 Dim pageIndex pageIndex = 0 ' Create File System object Set FSO = CreateObject("Scripting.FileSystemObject") ' Get folder object (current folder) Set inputFolder = FSO.GetFolder(WScript.Arguments.Item(0)) ' Get file list Set files = inputFolder.Files ' Prepare output folder outputFolder = WScript.Arguments.Item(1) If FSO.FolderExists(outputFolder) Then FSO.DeleteFolder outputFolder, True End If FSO.CreateFolder outputFolder ' Run barcode search for PDF and TIFF files For Each file in files ext = UCase(FSO.GetExtensionName(file)) If ext = "PDF" Then WScript.Echo "Processing file " & FSO.GetFileName(file) renderer.LoadDocumentFromFile file fileName = FSO.BuildPath(WScript.Arguments.Item(1), FSO.GetFileName(file) & ".page0.png") renderer.Save fileName, outputImageFormat, pageIndex, renderingResolution WScript.Echo " first page converted to " & fileName End If Next WScript.Echo "Done." Set renderer = Nothing Set FSO = 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