WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Ghostscript

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Ghostscript Extender

 Keywords:  

Provides an interface between WinBatch and the GhostScript interpreter.

[ghostx.zip]


Author:
   Alan Kreutzer

Info:
   The Ghostscript Extender provides an interface between WinBatch
   and the GhostScript interpreter.

   To use the extender you must download and install GhostScript.
   You can find it here ... http://www.ghostscript.com/doc/AFPL/index.htm

   The extender has been tested with AFPL GhostScript version 8.11,
   it may not work correctly with other versions.

   Once GhostScript has been installed, find the GhostScript API DLL
   (gsdll32.dll in the ghostscript "BIN" directory.)
   You must copy this dll into the same directory as the GhostScript Extender DLL.

Version:
   15.08.2003
   PRODUCTVERSION 10000

Download:
   ghostx.zip  35 KB

Usage:
   AddExtender("xgs34i.dll")

Functions:

   GhostscriptExtenderInfo (n)
      n = 0 ... returns the extender version
      n = 1 ... returns the number of functions
      n = 2 ... returns the number of constants

   GhostscriptVersion ()
      Returns the version of the GhostScript interpereter

   GhostscriptPS2PDF (InputFile, OutputFile)
      InputFile  ... The name of a Postscript print file.
      OutputFile ... The name of a PDF (Acrobat) file to be created.

      Converts the input file from PostScript to PDF.
      Returns 0 if successful.
      A non-zero return indicates an error.

   GhostscriptPrint (InputFile [,Printer [,WindowFlag]])
      InputFile  ... The name of a Postscript or PDF file to be printed.
      OutputFile ... The name of a printer on your system.
                     If this is an empty string, or is omitted,
                     the user will be prompted for the printer name.
      Window ....... @TRUE = Display a window which includes a CANCEL button.
                     @FALSE = No window.
                     If this is omitted, the default is @TRUE.

      Sends a Postscript or PDF file to the printer.
      (The printer does not need to be Postscript compatible.)
      It assumes standard size (letter) paper.

   GhostscriptCommand (Parameter, Parameter, ...)
      Executes GhostScript with any parameters that would be valid on the command line.
      You may specify up to 16 parameters.
      The command line parameters are described in the GhostScript documentation,
      which you will find in the GhostScript install folder, in the "DOC" folder.

      Note that the command line options  -dNOPAUSE and -q are always used,
      whether you specify them or not.

      Example... to convert a PDF file to a JPG:
         Status = ghostscriptCommand("-sDEVICE=jpeg","-sOutputFile=Map.jpg","Map.pdf")

   GhostscriptMessages ()
      Returns the messages that the GhostScript interpereter printed to "stdout" and "errout".
      These messages are not usually needed, but may help determine the problem when a command is failing.
 

Article ID:   W16870
File Created: 2019:08:14:08:57:58
Last Updated: 2019:08:14:08:57:58