1PS2RASTER(1)                 Generic Mapping Tools                PS2RASTER(1)
2
3
4

NAME

6       ps2raster - Converts one or several PostScript file(s) to other formats
7       using GhostScript
8

SYNOPSIS

10       ps2raster psfile(s)  [  -A[u]  ]  [  -Doutdir  ]  [  -Eresolution  ]  [
11       -Gghost_path ] [ -Llistfile]  [ -P ] [ -S ] [ -Te|f|j|g|m|t ] [ -V ]
12

DESCRIPTION

14       ps2raster  reads one or more PostScript files (or a file with a list of
15       PostScript filenames) and modifies the page  size  in  order  that  the
16       resulting  image will have a size determined by the BoundingBox.  As an
17       option, a tight BoundingBox may be computed first.
18
19       psfiles
20              Names of PostScript files to be converted. The output files will
21              have  the  same  name  but  with the conventional extension name
22              associated to the raster format (e.g. .jpg for the jpeg format).
23              Use -D to redirect the output to a different directory.
24

OPTIONS

26       -A     Adjust the BoundingBox to the minimum required by the image con‐
27              tent.  Append u to first remove any GMT-produced time-stamps.
28
29       -D     Sets an alternative output directory (which must exist) [Default
30              is  the  same  directory as the PS files].  Use -D. to place the
31              output in the current directory instead.
32
33       -E     Set raster resolution in dpi [default = 720  for  PDF,  300  for
34              others].
35
36       -G     Full  path  to your ghostscript executable.  NOTE: For Unix sys‐
37              tems this is generally not necessary.  However,  under  Windows,
38              GhostScript  is not added to the system's path. So either you do
39              it yourself, or  give  the  full  path  here.  (e.g.,  -Gc:\pro‐
40              grams\gs\gs7.05\bin\gswin32c).
41
42       -L     The  listfile  is an ASCII file with the names of the PostScript
43              files to be converted.
44
45       -N     This option is obsolete. Use -S and/or -Te instead.
46
47       -P     Force Portrait mode. All Landscape mode plots  will  be  rotated
48              back so that they show unrotated in Portrait mode. This is prac‐
49              tical when converting to image formats or preparing EPS  or  PDF
50              plots for inclusion in documents.
51
52       -S     Print  to  standard  output the ghostscript command after it has
53              been executed.
54
55       -T     Sets the output format, where e means EPS, f means PDF, j  means
56              JPEG,  g  means  PNG,  m  means PPM, and t means TIF [default is
57              JPEG].  The EPS format can be combined with  any  of  the  other
58              formats. For example, -Tef creates both an EPS and a PDF file.
59
60       -V     Run in verbose mode and report on progress [Default is silent].
61

NOTES

63       The  conversion  to  raster  images  (JPEG, PNG, PPM or TIF) inherently
64       results in loss of details that are available  in  the  original  Post‐
65       Script  file. Choose a resolution that is large enough for the applica‐
66       tion that the image will be used for. For web pages, smaller dpi values
67       suffice,  for  Word documents and PowerPoint presentations a higher dpi
68       value is recommended. ps2raster uses the  loss-less  Flate  compression
69       technique when creating JPEG, PNG and TIF images.
70
71       EPS  is  a vector, not a raster format. Therefore, the -E option has no
72       effect on the creation of EPS files. Using the option -Te  will  remove
73       PageSize commands from the PostScipt file and will adjust the Bounding‐
74       Box when the -A option is used.
75
76       Although PDF is also a vector format, the -E option has  an  effect  on
77       the resolution of pattern fills and fonts that are stored as bitmaps in
78       the document. ps2raster therefore uses a larger default resolution when
79       creating  PDF  files.  In  order  to obtain high-quality PDF files, the
80       /prepress options are in effect, allowing only loss-less compression of
81       raster images embedded in the PostScript file.
82
83       See  Appendix  C  of  the GMT Technical Reference and Cookbook for more
84       information on how ps2raster is used to produce graphics  that  can  be
85       inserted into other documents (articles, presentations, posters, etc.).
86

EXAMPLE

88       To  convert  a  the file psfile.ps to PNG using a tight BoundingBox and
89       rotating it back to normal orientation in  case  it  was  in  Landscape
90       mode:
91
92       ps2raster psfile.ps -A -P -Tg
93
94       (This  command  assumes  that ghostscript can be found in your system's
95       path.)
96

SEE ALSO

98       GMT(1)
99
100
101
102GMT 4.3.1                         15 May 2008                     PS2RASTER(1)
Impressum