# PS2RASTER

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
NOTES
EXAMPLE
SEE ALSO

## NAME

| ps2raster − Converts one or several PostScript file(s) to other formats using GhostScript

## SYNOPSIS

| ps2raster psfile(s) [ −A ] [ −E resolution ] [ −G ghost_path ] [ −L listfile] [ −N ] [ −Te|f|j|g|m|t ]

## DESCRIPTION

| ps2raster reads one or more PostScript files (or a file with a list of PostScript filenames) and modifies the page size in order that the resulting image will have a size determined by the BoundingBox. As an option, a tight BoundingBox may be computed first.

| psfiles

| Names of PostScript files to be converted. The output files will have the same name but with the conventional extension name associated to the raster format (e.g. .jpg for the jpeg format).

## OPTIONS

| −A |  | Adjust the BoundingBox to the minimum required by the image content.
| −E |  | Set raster resolution in dpi [default = 720 for PDF, 300 for others].
| −G |  | Full path to your ghostscript executable. NOTE: For Unix systems this is generally not necessary. However, under Windows, GhostScript is not added to the system’s path. So either you do it yourself, or give the full path here. (e.g., −Gc:\programs\gs\gs7.05\bin\gswin32c).
| −L |  | The listfile is an ASCII file with the names of the PostScript files to be converted.
| −N |  | Do not remove auxiliary files (by default it does). Auxiliary files are built using as base the input PostScript files and consist of: psfile_tmpxx.eps -> PostScript with a modified BoundingBox psTOraster.sc|bat -> script (or batch) with the ghostscript command that does the job. Use this option to save the script and run it later with different settings.
| −T |  | Sets the output format, where e means EPS, f means PDF, j means JPEG, g means PNG, m means PPM, and t means TIF [default is JPEG].

## NOTES

| The conversion to raster images (JPEG, PNG, PPM or TIF) inherently results in loss of details that are available in the original PostScript file. Choose a resolution that is large enough for the application that the image will be used for. For web pages, smaller dpi values suffice, for Word documents and PowerPoint presentations a higher dpi value is recommended. ps2raster uses the loss-less Flate compression technique when creating JPEG, PNG and TIF images. EPS is a vector, not a raster format. Therefore, the -E option has no effect on the creation of EPS files. Using the option -Te will remove PageSize commands from the PostScipt file and will adjust the BoundingBox when the -A option is used. Although PDF is also a vector format, the -E option has an effect on the resolution of pattern fills and fonts that are stored as bitmaps in the document. ps2raster therefore uses a larger default resolution when creating PDF files. In order to obtain high-quality PDF files, the /prepress options in effect, allowing only loss-less compression of raster images embedded in the PostScript file.

## EXAMPLE

| To convert a the file psfile.ps to PNG using a tight BoundingBox and assuming that gs can be found in your system’s path: ps2raster psfile.ps −A −Tg

## SEE ALSO

| GMT(l)