Debenu Quick PDF logo

GhostScriptGetPagePreview

Version history

This function is not available from Quick PDF Library version 7.11.

The built in rendering functions should be used instead.

Description

Uses the GhostScript Interpreter DLL to render a specific page of a PDF to an image. This function is a simple wrapper around the GhostScript DLL, check the GhostScript website (www.ghostscript.com) for licensing issues, etc.

Definition

function GhostScriptGetPagePreview(InputFileName As String,
  OutputFileName As String,
  Password As String,
  Page As Long,
  Resolution As Long,
  Options As Long) As Long

Parameters

InputFileName The file name of the PDF document to render.
OutputFileName The name of the image file to create, for example "c:\output.jpg".
Password The password to use when opening the PDF document, leave this parameter blank if the document does not need a password to be opened.
Page The page number to render. 1 is the first page.
Resolution The resolution to use for the image in DPI (dots per inch). Must be a value between 36 and 2400.
Options Output options:
0 = JPEG (24-bit RGB)
1 = PNG (24-bit RGB)

Returns

0 The page could not be rendered, either GhostScript was not properly initialized, or the document could not be opened, or the specified page was invalid.
1 The specified page was rendered successfully.