Making large format posters at the Courant

Here are some hints on outputting beautiful large format posters in PostScript using interpolated images generated from sets of 2D arrays of real numbers. This allowed me to print large format posters with very few steps from my original data, making use of the HP DesignJet printer belonging to the Applied Math Lab / VizLab on the 11th floor of the Courant Institute at NYU. I used free software on a Linux system. The first step is useful to anyone wishing to write raw PostScript image(s); the other two steps are relevant only to users of the same or similar printer models.

Writing EPS from data arrays

The Image Dictionary (PostScript LanguageLevel 2) allows a nice human-readable image header format which includes interpolated images, which I wanted. See the Adobe PostScript Language Reference ("Red Book"). A basic PS image file demonstrating interpolation is,

% Writes interpolated colour image.
% 2x2 block:
% black green
% red   blue

/DeviceRGB setcolorspace
/i {72 mul} def                     % user units are 1/72 inch
1 i 1 i translate 6 i 6 i scale     % 1 in offset, 6 in square image
 /ImageType 1
 /Width 2 /Height 2 
 /BitsPerComponent 8                % each color component in range 00 to ff hex.
 %/MultipleDataSources true         % Although given in Red Book, this fails, hence removed
 /ImageMatrix [2 0 0 2 0 0]         % data order: left to right (inner loop), bottom to top.
 /Decode [0 1 0 1 0 1]
 /Interpolate true                  % tells printer to try and interpolate pixels, much nicer
 /DataSource currentfile /ASCIIHexDecode filter
% ASCII hex data RGB RGB ..., spaces and linefeeds ignored, follows image cmd
ff0000 0000ff 000000 00ff00
>                                   % terminate the filter. no comments allowed in hex data

I then wrote C code to output essentially a larger version of the above using a floating-point 2D data array, but with extra options for

This routine sits in my viewer package. I use it to output an EPS file. You will need to edit the C code to read your own data array and suit your own loop ordering. I did not have to time to write and test a library.

Annotating and exporting to PS

I opted for xfig to read in the EPS as a Picture Object, annotate, and export to I exported as Portrait, with ANSI-E page size. The displayed page limits are modified in xfig only by setting them in the export options. One complication is that changing to Landscape can actually remove the interpolation from the image. This is a `feature' of GhostScript; you can check with GhostView that the above interpolation is not rendered when Landscape is used. Why, I don't know.

I avoided LaTeX for now due to large format complexities and lack of ability to place labels visually.

Driving the printer

Estarose has collected wisdom about the AML/VizLab large format printer, now residing on the 11th floor. She has found that driving the printer directly from MS Powerpoint on the Dell PC called phylum is most reliable. However, I preferred to drive the printer myself,

  1. in order to preserve the interpolation setting for PS images (I found this was lost when passed through eg Adobe Illustrator on the continuum G4 box),
  2. so save moving huge files (and myself) around unnecessarily, and
  3. to avoid MS products if at all possible.
It is an HP DesignJet 755CM, and suggests the dnj650c driver for others in the HP DesignJet 700 Series. We can then use any GhostScript which comes with this driver. It works fine, including interpolated images. Include the following in your .bashrc or equivalent,

alias lpbigps='gs -q -dNOPAUSE -dBATCH -sDEVICE=dnj650c -sPAPERSIZE=archE -sOutputFile=\|"lpr [email protected]"'

and you have a useful command lpbigps that does what you want. The paper size "Arch E" is 36" by 48", the 36" being appropriate for this printer. Excess length in the vertical (48") direction does not result in wasted paper. I found 100MB posters transfer in a few minutes and print in under 30 mins.

Alex Barnett, Feb 27 2004