Rasterizer 2017

IncludeAnnotations

' Copyright (c) 2019 ActivePDF, Inc.
' ActivePDF Rasterizer 2017
' Example generated 09/16/19 

Dim FSO, strPath, pageCount, currentPage

' Get current path
Set FSO = CreateObject("Scripting.FileSystemObject")
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\"
Set FSO = Nothing

' Instantiate Object
Set oRAS = CreateObject("APRasterizer.Object")

' Open PDF
oRAS.OpenFile strPath & "doc.pdf"

' Get page count of open file
pageCount = oRAS.NumPages()

For currentPage = 1 To pageCount
  ' Image Format
  ' 1 = RGB
  ' 2 = JPEG
  ' 3 = TIFF
  ' 4 = PNG
  ' 5 = BMP
  oRAS.ImageFormat = 2
  
  ' Output Type
  ' 1 = Stream
  ' 2 = File
  oRAS.OutputFormat = 2
  
  ' Other settings
  oRAS.OutputFileName = strPath & "doc" & currentPage & ".jpg"
  oRAS.JPEGQuality = 72
  oRAS.IncludeAnnotations = true
  
  ' Render the current page
  oRAS.RenderPage currentPage
Next

' Finished rendering pages, close file
oRAS.CloseFile 

' Release Object
Set oRAS = Nothing

' Process Complete
Wscript.Echo("Done!")

Copyright © 2019 ActivePDF, Inc