ByteScout PDF Renderer SDK - VBScript and VB6 - PDF To PNG - ByteScout

ByteScout PDF Renderer SDK – VBScript and VB6 – PDF To PNG

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Renderer SDK – VBScript and VB6 – PDF To PNG

ByteScout PDF Renderer SDK – VBScript and VB6 – PDF To 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 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

' 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




  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next