Plotter Setup

Overview

Through the use of two translation programs, called filters, Alias can plot to Postscript or HP/GL printers and plotters using the standard interfaces provided as part of the UNIX(TM) Line Printer facilities in IRIX 4.X or IRIX 5.X.

All Alias plotter support is network accessible and multi-user. This support is provided by Alias interfacing all plotter activity through the UNIX(TM) Line Printer facility. Some plotters, like the HP-7475A and IBM 6184, which have no sheetfeed capability, should have their use arbitrated outside the UNIX(TM) Line Printer spooling facility.

The translation programs provide support for a variety of printers and plotters including the following:

Printer or Plotter Installation

Before plotting from Alias you must connect and set up your printer or plotter and the UNIX(TM) Line Printer queue. This is described in full in SGI's Personal System Administration Guide, Chapter 5, "Managing Printers," provided with each system. This manual describes how to manage print operations from the IRIS using the Printer Manager. Select the Printer Manager which is found in the Toolchest as follows:

Selecting the Printer Manager opens the Printer Manager window which appears as follows:

We recommend the following selections when adding a printer or plotter:
If you are using a RS-232 serial connected plotter:
Type of connection Serial
Printer type Serial Plotter
Type of handshaking Software

If you are using a parallel connected plotter:
Type of connection Parallel
Printer type Generic Printer

If you are using a PostScript(TM) printer:
for RS-232 serial connected printers:
Type of connection Serial
Type of handshaking Software
Printer type Select based on the following: · LaserWriter for an Apple LaserWriter · LaserWriter II for an Apple LaserWriter II · Generic PostScript for all others
for parallel connected printers:
Type of connection Parallel
Printer type Generic PostScript

Remote Plotting

To setup for remote plotting you need to run the Printer Tool on the remote system and add a networked printer.
Type of connection Network
Remote hostname Enter the hostname of the machine that the plotter is physically attached to.
Remote printer name Enter the printer name as it is on the machine that the plotter is physically attached to.

Configuration

The two translation programs, bin/psplotf and bin/hp_glplotf, may be used as stand-alone filters to allow Alias plots to be imported as PostScript or HP/GL into other programs such as publishing programs. Plotting from within the interactive package, using File Plot..., is controlled by the etc/plotit script, which passes Alias plot information through one of these filters and onto the UNIX(TM) Line Printer spooling facility.

Plotter setup options are available through the Alias Preferences window, under the Plot Options section which appears as follows:

Plot Options

Plotter type

Plotter type specifies the type of plotter used by the plotting interface. The following are the acceptable options for Plotter type:

Plotter host

Plotter host specifies which machine your plotter is connected to on your network. Specifying localhost indicates the machine that you are logged on to.

LP destination name for plotter

Plotter device

Plotter device specifies to which print queue the plotter output should be sent. (The name is installation dependent. Refer to the lp(1) section of the UNIX manual.)

LP queue options for plot output

Plotter options

Plotter options specifies options used when submitting jobs to the lp(1) command, translator program (bin/psplotf or bin/hp_glplotf), or the etc/plotit script. These options should be in one of the following forms:

If this variable is empty, no options are passed on to the plotter driver. (See the Driver Options section below.)

Plot filter

This variable should almost never be needed and is not defined in the default Preferences file supplied with Alias.

If this variable is set, it is used as the command invoked by the interactive package instead of etc/plotit. The interactive package calls the etc/plotit script as follows:

plotit <ALIAS_PLOT_OPTIONS> -t<ALIAS_PLOT_TYPE> \ -d<ALIAS_PLOT_DEVICE> <plotfile>

Driver Options

In addition to the options for the lp(1) command, there are options for the filters (bin/psplotf and bin/hp_glplotf) and options for the etc/plotit script.

The only option available for the etc/plotit script is the save Alias plotfile option (-s). This option causes the intermediate file to be saved. This intermediate file, known as an Alias PLOTFILE, can be used as input to the filter programs bin/psplotf and bin/hp_glplotf.

In the descriptions of the filters below the only options supported as Preferences are indicated with (APO). The other options are controlled by the etc/plotit script and the Alias interactive package. Even some of these options are only used as the default values to File Plot....

Filters

The bin/psplotf filter translates Alias plot information into Postscript.

The bin/hp_glplotf filter translates Alias plot information into HP/GL.

During this process bin/hp_glplotf requires information about the model of printer or plotter you intend to use. This information is provided for a variety of printers and plotters in the file sys/install/hp_gl.cfg. This file is user editable which allows customers to add support for other HP/GL printers and plotters. Instructions on adding configurations is provided later in this section.

psplotf filter

psplotf is a plotter driver program, which is designed to translate Alias plot files into Postscript suitable for printing on any Postscript printer.

It actually is a filter, which takes its input from stdin or <in_file> and sends its output to stdout or <out_file>, instead of to lp.

The usage statement for psplotf is as follows:

psplotf [-f fontname] [-h] [-i] [-r #] [-s # # #] [-t #] [-u] [-w #] [<in_file> [<out_file>]]
Where:
-f fontname specifies the font name to use.
-h displays the on-line help.
-i displays the version information.
-r # specifies the rotation angle.
-s # # # specifies the paper size. The # values represent x min, x max, y min, and y max.
-t # specifies the font size.
-u specifies that the program generated initialization string is not to be used.
-w # specifies the line width.
<in_file> specifies the name of the file to use as input. The default is to read from the file stdin.
<out_file> specifies the name of the file to write the output to. The default is to write to the file stdout.

For further information about psplotf, see the psplotf section of the Stand-alone Utilities chapter of this book.

hp_plotf filter

hp_glplotf is a plotter driver program designed to translate Alias plot files into HP-GL (IBM-GL) suitable for plotting on any supported plotter.

It actually is a filter, which takes input from stdin or <in_file> and sends its output to stdout or <out_file>, instead of to lp.

The usage statement for hp_plotf is as follows:

hp_glplotf [-a] [-c<x>[<y>]] [-h] [-i] [-m<model>] [-n] [-p<paper>] [-r<angle>] [-s] [-t # #] [<in_file> [<out_file>]]
where:
-a specifies automatic page feed is to be used. (APO)
-c<x>[<y>] specifies scale correction factors. (APO)
-h displays the on-line help.
-i displays version information.
-m<model> specifies the plotter model type.
-n separates HPGL plot commands on new lines.
-p<paper> specifies the paper type. (APO)
-r<angle> specifies the force plot rotation angle.
-s sizes the plot produced automatically. The plotter's default size is used.
-t # # specifies the text scaling where # and # are the width and height.
<in_file> reads input from the file <in_file>. The default is to read from stdin.
<out_file> writes output to the file <out_file>. The default is to write to stdout.

Any errors encountered by the HP-GL and IBM-GL device drivers are written to a file called /tmp/plot_err.<some number> as well as /usr/adm/syslog. Look there for any clues as to why the plotter is not working. The <some number> is determined by the operating system.

Automatic Page Advance

Some plotters can be fitted with a spool feed or automatic page advance option. This also applies to printers like the IBM-4019 and IBM-4029, which can automatically advance the page. To tell the plotter driver that you are using the spool feed option the following option should be specified as follows:

-fa

Correction Factor

When plotting large plots, some inaccuracies can creep in over large distances. As an interim fix, it is possible to compensate for this error by specifying x and y correction factors. The default x and y correction factor is 1.0, which is no correction at all. The correction factors are used internally as multipliers. To specify an x and y correction use the following options:

-fc<xcorr>,<ycorr> or

-fc<corr> The first version sets the x correction factor to <xcorr> and y correction factor to <ycorr>. The second version sets both the x and y correction factors to <corr>.

Example

If you plotted something that should have come out 30" and it came out to 30.125", the plot was 0.125" too large. Assuming that the same error occurs in both the x and y directions, you would need a correction factor of 30/30.125 = 0.9959. The following should compensate for the error:

-fc0.9959 Setting the correction values in the Plotting Interface window opened by File Plot..., overrides the correction values in the LP queue options for plot output section of the Alias Preferences window.

Paper Size

Most plotters support a variety of paper sizes. To set the default paper size for the File Plot... and the plotter, specify an option similar to the following:

-fpDH which sets the paper size to D Horizontal.

Setting the paper size in the Plotting Interface window opened by File Plot..., overrides the paper size in LP queue options for plot output section of the Alias Preferences window.

The following tables identify the available paper sizes for each device.

IBM-4019 and IBM-4029 printers
1 AV A vertical 9.97 by 7.68 inches (default)

IBM-6182 plotter
1 AV A vertical 9.97 by 7.68 in. (default)
2 BV B vertical 16.12 by 9.97 in.
3 A4V A4 vertical 271.75 by 190 mm
4 A3V A3 vertical 399.25 by 271.75 mm

IBM-6184 plotter
1 CV C horizontal 14.87 by 20.82 in.
2 DV D vertical 31.87 by 20.82 in.(default)
3 A2V A2 vertical 540 by 390 mm
4 A1V A1 vertical 786 by 564 mm
5 RCV Architectural C ver. 21.87 by 16.82 in.
6 RDV Architectural D ver. 33.87 by 22.82 in.

IBM-6185 plotter
1 AH A horizontal 6.37 by 9.82 in.
2 AV A vertical 8.87 by 7.32 in.
3 BH B horizontal 8.87 by 15.82 in.
4 BV B vertical 14.87 by 9.82 in.
5 CH C horizontal 14.87 by 20.82 in.
6 CV C vertical 19.87 by 15.82 in.
7 DH D horizontal 19.87 by 32.82 in.
8 DV D vertical 31.87 by 20.82 in.
9 EV E vertical 41.87 by 32.82 in.(default)
10 A4H A4 horizontal 156.0 by 267.0 mm
11 A4V A4 vertical 243.0 by 180.0 mm
12 A3H A3 horizontal 243.0 by 390.0 mm
13 A3V A3 vertical 366.0 by 267.0 mm
14 A2H A2 horizontal 366.0 by 564.0 mm
15 A2V A2 vertical 540.0 by 390.0 mm
16 A1H A1 horizontal 540.0 by 811.0 mm
17 A1V A1 vertical 787.0 by 564.0 mm
18 A0V A0 vertical 1135.0 by 811.0 mm
19 RAH Architectural A hor. 6.87 by 10.82 in.
20 RAH Architectural A ver. 9.87 by 7.82 in.
21 RAH Architectural B hor. 9.87 by 16.82 in.
22 RAH Architectural B ver. 15.87 by 10.82 in.
23 RAH Architectural C hor. 15.87 by 22.82 in.
24 RAH Architectural C ver. 21.87 by 16.82 in.
25 RAH Architectural D hor. 21.87 by 34.82 in.
26 RAH Architectural D ver. 33.87 by 22.82 in.
27 RAH Architectural E ver. 45.87 by 34.82 in.

IBM-6186 plotter
1 AH A horizontal 9.74 by 6.3 in.
2 AV A vertical 8.8 by 7.24 in.
3 BV B vertical 14.8 by 9.74 in.
4 CH C horizontal 20.74 by 14.8 in.
5 DH D horizontal 32.74 by 19.8 in.
6 DV D vertical 31.8 by 20.74 in.
7 EV E vertical 41.8 by 32.8 in.(default)
8 A4H A4 horizontal 265 by 154 mm
9 A4V A4 vertical 241 by 178 mm
10 A3V A3 vertical 364 by 265 mm
11 A2H A2 horizontal 562 by 364 mm
12 A1H A1 horizontal 809 by 538 mm
13 A1V A1 vertical 785 by 562 mm
14 A0V A0 vertical 1133 by 809 mm
15 RCH Architectural C hor. 22.74 by 15.8 in.
16 RDV Architectural D ver. 33.8 by 22.74 in.
17 RDH Architectural D hor. 33.74 by 21.8 in.
18 AEV Architectural E ver. 45.8 by 34.74 in.

HP-7475A plotter
1 AV A vertical 9.97 by 7.68 in.(default)
2 BV B vertical 16.12 by 9.97 in.
3 A4V A4 vertical 271.75 by 190 mm
4 A3V A3 vertical 399.25 by 271.75 mm

HP-7595A Plotter
1 AH A horizontal 9.74 by 6.3 in.
2 AV A vertical 8.8 by 7.24 in.
3 BV B vertical 14.8 by 9.74 in.
4 CH C horizontal 20.74 by 14.8 in.
5 DH D horizontal 32.74 by 19.8 in.
6 DV D vertical 31.8 by 20.74 in.(default)
7 EV E vertical 41.8 by 32.8 in.
8 A4H A4 horizontal 265 by 154 mm
9 A4V A4 vertical 241 by 178 mm
10 A3V A3 vertical 364 by 265 mm
11 A2H A2 horizontal 562 by 364 mm
12 A1H A1 horizontal 809 by 538 mm
13 A1V A1 vertical 785 by 562 mm
14 A0V A0 vertical 1133 by 809 mm
15 RCH Architectural C hor. 22.74 by 15.8 in.
16 RDV Architectural D ver. 33.8 by 22.74 in.
17 RDH Architectural D hor. 33.74 by 21.8 in.
18 AEV Architectural E ver. 45.8 by 34.74 in.

Saving HP/GL to a File

It is not possible to save HP/GL to a file from within Alias. However, you can save HP/GL to a file as follows:

  • Edit the Plot Options section of your Alias Preferences window to add the -s option.

  • Plot your model to whatever plotter you have available, including a PostScript printer, or to a PostScript file. The Alias PLOTFILE is saved.

  • Type the following: hp_glplotf options plotfile hpgl_file where options could include any of:
    -c<x>[<y>] specifies scale correction factors.
    -m<model> specifies plotter model type.
    -p<paper> specifies paper type.
    plotfile is the name of the Alias PLOTFILE you saved.
    hpgl_file is the name you want the HP/GL saved to.

    For more information, see hp_glplotf in the Stand-alone Utilities chapter of this book.

    Adding Support for Other HP/GL Plotters

    To add support for unsupported HP/GL Printers and Plotters you need to edit the file sys/install/hp_gl.cfg. To do this, you must have write permissions on that file and be familiar with one of the UNIX(TM) editors.

    The configuration file can contain the information for a number of different plotters. This information is used by hp_glplotf to produce HP/GL compatible with the selected plotter. For each plotter described in the configuration file the following six fields of information must be provided:
    CLIP records the maximum plotting length and width. It is computed as the axis +ve extreme - 1 and the axis -ve extreme + 1. It is listed with horizontal axis, length, first and vertical, width second.
    INFO records the paper size acronym, the full name of the paper size, and the measured plot area size, in inches or millimeters, as appropriate.
    RANGE records the P1x, P2x, P1y, and P2y values of the page. The x-range, which comes first, is always along the longest axis of the page.
    UNITS_PER_CM records the number of plotter units per centimeter. This is also known as the plotter resolution.
    PAGEFEED records whether the plotter can automatically feed pages. The value is TRUE if it can.
    DEFAULT_PAGE_SIZE identifies which configuration item is the default for paper size.

    Each of these fields appear as an entry in the plotter configuration file.

    An entry in the plotter configuration file appears as follows:

    a field identifier (CLIP, INFO, RANGE, UNITS_PER_CM, UNITS_PER_CM or DEFAULT_PAGE_SIZE) followed by the information required For the fields CLIP, INFO, and RANGE there are entries for each paper size. These entries consist of:

    an identifier (either Start or Stop), followed by the plotter name, followed by the word configuration

    Example

    An IBM 6182 plotter entry appears as follows:

    Start IBM-6182 configuration ... Stop IBM-6182 configuration The space between IBM and 6182 is replaced by a -. The plotter name cannot contain a space.

    The information required for each of these fields is usually found in the User's Guide that came with your plotter. To provide a better understanding of these fields and the information required for these fields, we will run through how we added support for the IBM-6182 plotter, which is already described in the configuration file.

    In the IBM 6182 Plotter User's Guide we find the following chart:
    Paper Size P1x,P1y P2x,P2y X-axis Y-axis Max. Plotting Area (X by Y)
    A (Vertical) 80,320 10080, 7520 0 to 10170 0 to 7840 9.97 X 7.68 in.
    B (Vertical) 620,80 15820,10080 0 to 16450 0 to 10170 16.12 X 9.97 in.
    A4 (Vertical) 430,200 10430, 7400 0 to 10870 0 to 7600 271.75 X 190.0 mm
    A3 (Vertical) 380,430 15580,10430 0 to 15970 0 to 10870 399.25 X 271.75 mm

    From this chart we obtain all the information required to complete the CLIP, INFO, and RANGE fields within the configuration file.

    CLIP

    The CLIP field describes the maximum plotting length and width for each paper size. The maximum plotting length and width are similar to the plotter's hard clip limits (physical boundaries for pen movement), but are based from 0 (zero). For a vertical paper on an IBM 6182 the length and width would be 7841 by 10171, which is Y-axis maximum + 1 by X-axis maximum +1.

    Often the X-axis and Y-axis limits are stated as ± <some number>, the CLIP field based from 0 (zero) so we translate the values such that they become based from 0 (zero). For example a X-axis ± 10576 and Y-axis ± 7556 would result in a CLIP field of 15112 (= 7556 + 7556 +1) by 21153 (= 10576 + 10576 + 1).

    In the case of the IBM 6182 we have the following CLIP fields:

    CLIP 1 7841 10171 /* A V */ CLIP 2 10171 16451 /* B V */ CLIP 3 7601 10871 /* A4 V */ CLIP 4 10871 15971 /* A3 V */

    INFO

    The INFO field describes the paper size acronym, the full name of the paper size, and the measured plot area size, in inches or millimeters.

    In the case of the IBM 6182 we have the following INFO fields:

    INFO 1 AV _A vertical_________ ___9.97 by 7.68 in. INFO 2 BV _B vertical_________ __16.12 by 9.97 in. INFO 3 A4V A4 vertical_________ _271.75 by 190.00 mm INFO 4 A3V A3 vertical_________ _399.25 by 271.75 mm The full name of the paper size and the plot area are prefixed with a _. This allows you to left and right justify the text when it appears in the plot interface popups.

    RANGE

    The RANGE field describes the plotter's Scaling Points P1 and P2. These points represent the usual plotting range on the different paper sizes. They are described in the following form

    P1x P2x P1y P2y In the case of the IBM 6182 we have the following RANGE fields:

    RANGE 1 80 10080 320 7520 /* A vertical */ RANGE 2 620 15820 80 10080 /* B vertical */ RANGE 3 430 10430 200 7400 /* A4 vertical */ RANGE 4 380 15580 430 10430 /* A3 vertical */

    UNITS_PER_CM

    The UNITS_PER_CM field specifies the number of plotter units per centimeter which is also known as the plotter resolution. The value can normally be found in the Plotter Specification section of the Plotter's User's Guide.

    In the case of the IBM 6182 we set the UNITS_PER_CM field to:

    UNITS_PER_CM 400

    PAGEFEED

    The PAGEFEED field specifies whether the plotter can automatically feed pages. The value is TRUE if it can.

    In the case of the IBM 6182, which uses cut sheet paper automatically loaded from a paper tray, set the PAGEFEED field to:

    PAGEFEED TRUE

    DEFAULT_PAGE_SIZE

    The DEFAULT_PAGE_SIZE identifies the number representing the paper size that is the default for the plotter. This is the only field for which values can not be found within the Plotter's User's Guide. This field can be arbitrarily set based on what you decide is your default paper size.

    In the case of the IBM 6182 we have set the DEFAULT_PAGE_SIZE to use A Vertical, number 1, as the default paper size:

    DEFAULT_PAGE_SIZE 1 All these fields combined result in the description of the IBM 6182 below, which also appears in the configuration file sys/install/hp_gl.cfg.

    ###################################################################### Start IBM-6182 configuration ######################################################################
    CLIP 1 7841 10171 /* A V */
    CLIP 2 10171 16451 /* B V */
    CLIP 3 7601 10871 /* A4 V */
    CLIP 4 10871 15971 /* A3 V */
    INFO 1 AV _A vertical_________ ___9.97 by 7.68 in.
    INFO 2 BV _B vertical_________ __16.12 by 9.97 in.
    INFO 3 A4V A4 vertical_________ _271.75 by 190.00 mm
    INFO 4 A3V A3 vertical_________ _399.25 by 271.75 mm
    RANGE 1 80 10080 320 7520 /* A vertical */
    RANGE 2 620 15820 80 10080 /* B vertical */
    RANGE 3 430 10430 200 7400 /* A4 vertical */
    RANGE 4 380 15580 430 10430 /* A3 vertical */
    UNITS_PER_CM 400
    PAGEFEED TRUE
    DEFAULT_PAGE_SIZE 1
    Stop IBM-6182 configuration #####################################################################





    aliasdocs@aw.sgi.com
    Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.