ByteScout PDF Renderer SDK - VBScript and VB6 - PDF To Image In Command Line - ByteScout

ByteScout PDF Renderer SDK – VBScript and VB6 – PDF To Image In Command Line

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Renderer SDK – VBScript and VB6 – PDF To Image In Command Line

PDF to image in command line in VBScript and VB6 with ByteScout PDF Renderer SDK

PDF to image in command line in VBScript and VB6

These source code samples are listed and grouped by their programming language and functions they use. ByteScout PDF Renderer SDK helps with PDF to image in command line in VBScript and VB6. ByteScout PDF Renderer SDK is the library that renders PDF into high quality images and thumbnails. Includes various functions like batch processing, PNG, TIFF output. Can be used from web and desktop applications.

The SDK samples like this one below explain how to quickly make your application do PDF to image in command line in VBScript and VB6 with the help of ByteScout PDF Renderer SDK. Follow the instruction from the scratch to work and copy and paste code for VBScript and VB6 into your editor. Enhanced documentation and tutorials are available along with installed ByteScout PDF Renderer SDK if you’d like to dive deeper into the topic and the details of the API.

Our website provides free trial version of ByteScout PDF Renderer SDK. It comes along with all these source code samples with the goal to help you with your VBScript and VB6 application implementation.

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 PDF Renderer SDK Home Page

Explore ByteScout PDF Renderer SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Renderer SDK 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 PDF Renderer SDK Home Page

Explore ByteScout PDF Renderer SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Renderer SDK 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 PDF Renderer SDK Home Page

Explore ByteScout PDF Renderer SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Renderer SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next