-->
Home » , , » Using HP2XX a HP-GL Converter: Introduction.
Thursday
11 April 2013

Using HP2XX a HP-GL Converter: Introduction.

hp2xxInvoking hp2xx.
The format of the hp2xx command is:
hp2xx [options] [input-file(s)]

It follows the UNIX System V tradition of a filter, i. e., options begin with `-', followed by a single letter and an optional parameter. Options must appear immediately behind the program name and before the input file name(s) (if specified). If no input file is given, hp2xx reads from stdin. In addition to this traditional option handling, hp2xx also supports GNU-style long options and option/non-option permutation (see section Option summary). 
However, throughout this manual all examples will only display short options.

hp2xx writes to the output file whose name can be specified by option `-f'. Without option `-f', hp2xx generates output file names from the input names and the selected mode (see option `-m'). hp2xx writes to stdout if you supply a dash as output file name like in `-f-'.

hp2xx for the impatient.

This section is intended to give those of you a quick-start who are quite familiar with traditional UNIX-style programs and with HP-GL and other graphics formats. The following examples will give you a good idea of hp2xx's functionality. See section Option summary for further details.
hp2xx foo.hp

Preview of HP-GL graphics in file `foo.hp'. The picture will fit into a square of 200 mm width, assuming that your output device (screen) features 75 DPI resolution (default).

hp2xx -q -d86 -h160 -w220  foo.hp bar.hp

Multiple-file preview. Option `-q' puts hp2xx into "quiet" mode. The picture will fit into a rectangle of 220 mm width and 160 mm height, assuming a 86 DPI resolution of the output device (screen).
hp2xx -t -c12340567 -p12230412 foo.hp
htmlimport_testplotfile
Preview, size according to original HP-GL data (as on a plotter), with different pen colors and sizes. Color and width according to:
  Pen # : Color code     / Size (pixel)
  -------------------------------------
    1   : 1 (black)      /    1
    2   : 2 (red)        /    2
    3   : 3 (green)      /    2
    4   : 4 (blue)       /    3
    5   : 0 (background) /    0
    6   : 5 (cyan)       /    4
    7   : 6 (magenta)    /    1
    8   : 7 (yellow)     /    2

hp2xx -m eps -l a.log -h100 -w150 -p542  foo.hp bar.hp
Encapsulated Postscript mode. Files `foo.eps' and `bar.eps' will be created. The diagnostic output will be written into `a.log', so hp2xx works quietly. Both EPS pictures will fit into a rectangle of size 150 x 200 mm. The size (width) of pen 1: 0.5 mm, pen 2: 0.4 mm, pen 3: 0.2 mm, pen 4 ... pen 8: 0.1 mm.

unix% cat foo.hp | hp2xx -m pcl -o30 -O50 -i -F -f- | lpr -P ljet

In this generic UNIX example, hp2xx reads HP-GL code from stdin, converts it to HP-PCL which is suitable for direct output on any HP Laserjet printer, and pipes the output via stdout into the appropriate printer queue. Option `-f-' forces hp2xx to write to stdout instead of a file, `-i' initializes the printer before the output, `-F' sends a FormFeed at the end of output. There will be (additional) 30 mm left and 50 mm top margins. 75 DPI are assumed per default.
hp2xx -m pcx -f foo3.pcx -d300 -h80 -w150 -r90 -P2:4  foo.hp
PCX mode. Output goes into file `foo3.pcx'. A limiting rectangle of 150 x 80 mm at 300 DPI is assumed. The picture will be rotated by 90 degrees. Only pages 2 to 4 of the multi-page HP-GL source is used (each occurrence of HP-GL code PG; increments the internal page counter).
hp2xx for the impatient

This section is intended to give those of you a quick-start who are quite familiar with traditional UNIX-style programs and with HP-GL and other graphics formats. The following examples will give you a good idea of hp2xx's functionality. See section Option summary for further details.
hp2xx_01
hp2xx foo.hp
Preview of HP-GL graphics in file `foo.hp'. The picture will fit into a square of 200 mm width, assuming that your output device (screen) features 75 DPI resolution (default).
hp2xx -q -d86 -h160 -w220  foo.hp bar.hp
Multiple-file preview. Option `-q' puts hp2xx into "quiet" mode. The picture will fit into a rectangle of 220 mm width and 160 mm height, assuming a 86 DPI resolution of the output device (screen).
hp2xx -t -c12340567 -p12230412 foo.hp
Preview, size according to original HP-GL data (as on a plotter), with different pen colors and sizes. Color and width according to:
  Pen # : Color code     / Size (pixel)
  -------------------------------------
    1   : 1 (black)      /    1
    2   : 2 (red)        /    2
    3   : 3 (green)      /    2
    4   : 4 (blue)       /    3
    5   : 0 (background) /    0
    6   : 5 (cyan)       /    4
    7   : 6 (magenta)    /    1
    8   : 7 (yellow)     /    2

hp2xx -m eps -l a.log -h100 -w150 -p542  foo.hp bar.hp
Encapsulated Postscript mode. Files `foo.eps' and `bar.eps' will be created. The diagnostic output will be written into `a.log', so hp2xx works quietly. Both EPS pictures will fit into a rectangle of size 150 x 200 mm. The size (width) of pen 1: 0.5 mm, pen 2: 0.4 mm, pen 3: 0.2 mm, pen 4 ... pen 8: 0.1 mm.
unix% cat foo.hp | hp2xx -m pcl -o30 -O50 -i -F -f- | lpr -P ljet
In this generic UNIX example, hp2xx reads HP-GL code from stdin, converts it to HP-PCL which is suitable for direct output on any HP Laserjet printer, and pipes the output via stdout into the appropriate printer queue. Option `-f-' forces hp2xx to write to stdout instead of a file, `-i' initializes the printer before the output, `-F' sends a FormFeed at the end of output. There will be (additional) 30 mm left and 50 mm top margins. 75 DPI are assumed per default.
hp2xx -m pcx -f foo3.pcx -d300 -h80 -w150 -r90 -P2:4  foo.hp
PCX mode. Output goes into file `foo3.pcx'. A limiting rectangle of 150 x 80 mm at 300 DPI is assumed. The picture will be rotated by 90 degrees. Only pages 2 to 4 of the multi-page HP-GL source is used (each occurrence of HP-GL code PG; increments the internal page counter).
Downloading hp2xx
tagtools-for-linux-942125

Custom Search
 
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:

0 commenti:

Post a Comment

Random Posts

  • Top 10 blog posts for February 2014 from Linuxlandit & The Conqueror Penguin.
    09.03.2014 - 0 Comments
    1.- Cadabra is a computer algebra system (CAS) designed specifically for the solution of problems encountered in field theory. Cadabra a  field-theory motivated approach to computer algebra- Cadabra is a computer algebra system (CAS)…
  • MCNLive is a Mandriva-based live CD developed by MandrakeClub.nl in the Netherlands.
    10.03.2010 - 0 Comments
    MCNLive, a Mandriva-based distribution and live CD, has been resurrected by the members of the Dutch Mandriva Club.Update: Michel Hoogervorst has announced the availability of the first release candidate for MCNLive Kris, a small Mandriva-based…
  • Vtwm (the Virtual Tabbed Window Manager) is an X window manager that was developed from the twm codebase.
    05.02.2011 - 0 Comments
    Vtwm (the Virtual Tabbed Window Manager) is an X window manager that was developed from the twm codebase. The first release was in 1990, and it is very much an "old school" window manager.It added features like xpm icons, autoraising of windows, and…
  • Twclock is a clock program which will prove to be very helpful for ham operators.
    08.09.2012 - 0 Comments
    Twclock is a clock program which will prove to be very helpful for ham operators Twclock is a clock program which will prove to be very helpful for ham operators. It is implemented with Motif widgets, and will displays the current time in major…
  • LuninuX OS is an Ubuntu-based Linux distribution designed to be beautiful, clean, simple, fast, and stable.
    05.08.2012 - 0 Comments
    LuninuX OS is a super-fast, great-looking, secure, intuitive operating system that powers desktops and laptops. LuninuX OS is absolutely free, and comes with a selection of the best applications designed to meet most of your daily needs. It can be…
  • Top 10 blog posts for June 2013 from Linuxlandit & The Conqueror Penguin.
    07.07.2013 - 0 Comments
    1.- Google Announces Summer of Code Accepted Projects. Google has announced the accepted projects list for its 2011 Google Summer of Code (GSOC) Program. 417 applications were reviewed and 175 open source projects were chosen and out of the 175…
  • ReactOS is a free, modern operating system based on the design of Windows XP/2003.
    31.03.2011 - 0 Comments
    ReactOS (React Operating System) is an open source computer operating system intended to be binary compatible with application software and device drivers made for Microsoft Windows NT versions 5.x and up (Windows 2000 and its successors). A…
  • ALT Linux 9.0 released
    09.11.2019 - 0 Comments
    ALT Linux is an independently developed distribution which is available in Workstation, Server and Education editions. The distribution runs on several CPU architectures, making it run on a wide range of hardware. The project's latest release is ALT…
  • The PLplot Library User Guide: Simple Use of PLplot.
    06.11.2015 - 0 Comments
    PLplot is a library of C functions that are useful for making scientific plots from programs written in C, C++, Fortran95, Java, Octave, Perl, Python, and Tcl/Tk. The PLplot project is being developed by a world-wide team who interact via the…
  • Fyre is a tool for producing computational artwork based on histograms of iterated chaotic functions.
    01.04.2013 - 1 Comments
    Fyre project is a tool for producing computational artwork based on histograms of iterated chaotic functions.  At the moment, it implements the Peter de Jong map in a fixed-function pipeline with an interactive GTK+ frontend and a command line…

Recent Posts

Recent Posts Widget

Popular Posts

Labels

Archive

page counter follow us in feedly
 
Copyright © 2014 Linuxlandit & The Conqueror Penguin
-->