Section: User Commands (1)
Return to Main Contents
hpgl2gif, hpgl2ppm, hpgl2bmp, hpgl2png, hpgl2tiff, hpgl2pdf, hpgl2cps - convert HPGL plot file to GIF, PPM, BMP, PNG or TIFF image, PDF or colour PostScript file
[-A | -B | -A3
hpgl2ppm [options] [hpglfile] > ppmfile
hpgl2bmp [options] [hpglfile] > bmpfile
hpgl2png [options] [hpglfile] > pngfile
hpgl2tiff [options] [hpglfile] > tifffile
hpgl2pdf [options] [hpglfile] > pdffile
hpgl2cps [options] [hpglfile] > psfile
Each of these programs interprets the HPGL instructions stored in the
or the standard input if no file is specified,
and generates output in the appropriate format.
The output is on the standard output, which should be redirected to a file.
The programs act as a front end to various filters,
mostly in the
suite and the
package, to carry the HPGL though the necessary sequence of conversions
to the desired final format.
programs emulate only a small subset of the full HPGL, which
is adequate for handling output from programs like
The output graphics are in an aspect ratio equivalent to
what would be produced by an HP plotter on A-size
- -p colour,...
Sets colours for various pens, up to 8 in all.
can be a name without spaces, as in the file
or hexadecimal values as #FFAA99.
The default is to use the colours specified in the
You can also use
for a faster rendering of a simple black on white or white on black
- -b colour
Sets the image background colour (default is white).
- -h height
Sets the image height in pixels (default is 400).
- -w width
Sets the image width in pixels (default is 520).
If only one of
is given, the other is set proportionally.
commands, the height and width are specified in decipoints, rather than
pixels, and the default size is 7920×6120, which corresponds to a US
A-size sheet of letter paper in landscape orientation.
You can use
-w 8420 -h 5950
for A4 landscape.
Causes a cleaner, but slower rendering, using the GhostScript
This also causes lines to be rendered somewhat thicker than the default
width of a single pixel.
commands ignore this option, as the former always uses
to render the PDF, and the latter doesn't render the PostScript.
produces a tweaked version of the output of
in which the pens select colours rather than simple shades of gray.
Causes the program to output a summary of command usage and options.
The following options will be passed directly to the initial HPGL conversion
program, which is hpgl2ras, hpgl2xpm or hpgl2psc.
Causes text to be suppressed.
Causes text to be
rendered as a series of line segments, using
to select a variable Hershey font, or by default,
a font approximating the default font on HP plotters.
Causes the image to be reduced to 72% of its linear size, and
rotated so that it appears in portrait orientation on the upper
part of a letter sized page.
This option only has an effect on the
Merges together multiple unconnected line segments into a
single path, rather than stroking each one separately.
This option only has an effect on the
command, and possibly on
as well, depending on how GhostScript renders the PS into a PDF.
- -A, -B, -A3, -A4
Adjust the coordinate system and aspect ratio to correspond to
the plotter's defaults for that page size.
The default page size can also be changed by setting the environment variable
to one of the above page sizes.
If you use one of these, you will probably also want to adjust the rendered
image size using
options, to get the right proportions for the chosen page size.
/usr/neuro/lib/rgb.txt X11 colour database
emuhpgl(1) (for hpgl2ras, hpgl2xpm and hpgl2psc),
xpmtoppm(1), xbmtopbm(1), ppmtogif(1), ppmtobmp(1), pnmtopng(1), pnmtotiff(1),
- Emuhpgl Options
- SEE ALSO
This document was created by
using the manual pages.
Time: 19:13:01 GMT, May 23, 2018
Copyright © G. R. Detillieux,
Spinal Cord Research Centre,
The University of Manitoba.