Link Search Menu Expand Document

Convert PDF To High Quality PNG - VBScript and VB6

PDF Renderer SDK sample in VBScript and VB6 demonstrating ‘Convert PDF To High Quality PNG’

PDFToPNG.vbs
' Create Bytescout.PDFRenderer.RasterRenderer  object
Set renderer = CreateObject("Bytescout.PDFRenderer.RasterRenderer")

renderer.RegistrationName = "demo"
renderer.RegistrationKey = "demo"

' Load sample PDF document
renderer.LoadDocumentFromFile "multipage.pdf"

' Render PDF document at 600 DPI for higher quality
Dim renderingResolution
renderingResolution = 600

' Image format: 0 - BMP; 1 - JPEG; 2 - PNG; 3 - TIFF; 4 - GIF
Dim outputImageFormat
outputImageFormat = 2

' Iterate through pages
For pageIndex = 0 To renderer.GetPageCount() - 1
	' Render document page to PNG image file
	renderer.Save "page" & CStr(pageIndex) & ".png", outputImageFormat, pageIndex, renderingResolution
Next



Download Source Code (.zip)

Return to the previous page Explore PDF Renderer SDK