Archive for December, 2006

We had the problem where the plot_test for B sized plots was being clipped a little on both sides. I tried every driver and parameter I could find and it didn’t matter. The file that needed to be changed was the configs/colorb file. The offset problem could be solved on one side by using the page_offset_left option. Unfortunately, this basically just moved the entire print area and ended up cutting off more on the right side of the plot. So, I had to add some more parameters, page_length and page_width. Here’s what I ended up using.

colorb config file:
device generic_ps
paper_size 24_INCH_ROLL
page_length 11.0 in
page_width 17.0 in
page_offset_left 0.75 in
page_offset_top 0.25 in
color_plotting enabled
setup_line <</PageSize [1296 1296]>> setpagedevice

I used 1296×1296 as the page size because that’s 18″x18″. The problems I had earlier were due to the fact that the plot area wasn’t fitting inside the 11″x17″ space. By giving it a little more room, the plots work just fine.

colorc config file:
device generic_ps
paper_size 24_INCH_ROLL
page_length 17.0 in
page_width 22.0 in
page_offset_left 0.75 in
page_offset_top 0.25 in
color_plotting enabled
setup_line <</PageSize [1656 1656]>> setpagedevice

colord config file:
device generic_ps
paper_size 24_INCH_ROLL
page_width 22.0 in
page_length 34.0 in
page_offset_left 0.75 in
page_offset_top 0.25 in
color_plotting enabled
setup_line <</PageSize [1728 2520]>> setpagedevice

The config files for C and D are the same as colorc and colord respectively, but have the color_plotting line changed to disabled. The B config file is different because it prints on our edg1 laser printer, which doesn’t need all these parameters set. In the colord file, notice that the setup_line does not have a square page size. This is because the paper (24″) isn’t wide enough for that. So the page size is set as 1728 (=24×72) by 2520 (=35×72). I used 35″ for the length to be sure to have enough room for both the plot and the offset.

To have duplexing on, by default, for our printers, install the printer with the following command:

lpadmin -p phaser -E -v socket://edg4:9100 -o Duplex=DuplexNoTumble -P /usr/share/cups/model/postscript.ppd.gz
lpadmin -p edg1 -E -v socket://edg1:9100 -o Duplex=DuplexNoTumble -o InputSlot=Tray3 -P /usr/share/cups/model/postscript.ppd.gz
lpadmin -p plotter -E -v socket://edg3:9100 -P /usr/share/cups/model/postscript.ppd.gz
lpadmin -d edg1 --This sets edg1 as the default printer

Then, to list the options in effect for the printer, use:

lpoptions -p phaser -l
Resolution/Output Resolution: 150dpi *300dpi 600dpi 1200dpi 2400dpi
Duplex/Double-Sided Printing: None *DuplexNoTumble DuplexTumble
PageSize/Media Size: *Letter Legal Executive A4 A5 B5 EnvISOB5 Env10 EnvC5 EnvDL EnvMonarch
InputSlot/Media Source: *Default Tray1 Tray2 Tray3 Manual
PageRegion/PageRegion: Letter Legal Executive A4 A5 B5 EnvISOB5 Env10 EnvC5 EnvDL EnvMonarch

The above will set the printers up ok, but we really want to use ppd files for our specific printers. So, copy the /etc/cups/ppd/* files and the /etc/cups/printers.conf files to the new computer.

Plotting on linux now works fine. Just use the postscript driver for the plotter.
Best C and D-sized plots come from printing to a file and opening and printing the file in Illustrator on a Windows machine–This will be true until a new driver is developed for linux.

Been having problems printing to C and D size paper on the plotter. Our plotter is an HP DesignJet 800PS, with ip address 10.135.152.15. The ppd file that comes from HP or from linux doesn’t work quite correctly with this printer. My solution was to take the ppd file from my Mac, edit it to take out all of the Mac-specific lines and use that.

The file is saved in /net/sw/edg/printerfiles/dj800.ppd. I then added the plotter with:

lpadmin -p plotter -P /net/sw/edg/printerfiles/dj800.ppd -v socket://10.135.152.15:9100
accept plotter
enable plotter

This does NOT work perfectly. It stil seems to cut off the very end of documents. But, that could be acceptable for most things. And that’s probably as good as it’s going to get. If a perfect printout is needed, the solution is to print to file and the plot the file from a Windows machine, where they have drivers that work.

Print command: lpr -Pplotter -oPageSize=AnsiC file_to_print

If, when starting plotconfig, an error saying something about libCDSXmotif appears, set the following environment variable.

setenv LD_LIBRARY_PATH ${ICHOME}/tools/lib

Had a problem only printing A-size plots, no matter which printer was used.  The plot would go to the correct printer, but it would print the incorrect size.

The file with all the information about plotting is in ${CDSHOME}/tools/plot/.cdsplotinit.  This file is created/edited with the plotconfig command which is located in ${CDSHOME}/tools/plot/bin.

Our problem had to do with how the queues were set up in plotconfig.  They should be set as follows:

B size on edg1:  lpr -Pedg1 -oPageSize=11×17

B size on plotter:  lpr -Pplotter -oPageSize=Tabloid

C size on plotter:  lpr -Pplotter -oPageSize=16×20

D size on plotter:  lpr -Pplotter -oPageSize=22×30

Note that 16×20 is not the real size for ansiC (17×22), nor is 22×30 the size for ansiD (22×34).  I had to pick sizes that were available in the ppd file for the plotter.  This file is in /etc/cups/ppd/plotter.  This is also the reason that B size on edg1 uses 11×17, while B size on the plotter uses Tabloid.

Files printed to A_file, B_file, etc. were all owned by user lp and had permissions of 600. So the user that created the file wasn’t allowed to read it. This was fixed by editing the fis file and adding the line:

umask 000

Now the files are still owned by lp, but anyone can read/write them.

To set a printer as the default in cups, edit /etc/cups/printers.conf. Change to to make edg1 be the default printer.

The location for the printer files is: /net/sw/mgc/printer

Inside this directory are:

configs/ – holding all config files
export_pdf/ – files required to create pdf files
fis/ – holding filter invocation scripts
logs/ – log file locations
model/ – location of model files to use with lpadmin
pet – the printer pet file

All machines use the same files when printing to a printer. But when printing to a file, all the machines use different files. So inside of each directory above, there is another directory with the machine name that holds the files needed for printing to a file.

Other log entries give the details for setting up printing to a printer. To set up printing to a file, it’s done much as it was under HPUX.

The only parameters I’m using are:
paper_sizes are either A, B, C or D
device is generic_ps
color_plotting is either enabled or disabled, depending on what want

Procedure
1. Create config file (template is in $MGC_HOME/shared/pkgs/ps_filter/templates/ps_filter.template)
2. Create a fis file (use filter_setup if need to make a new one)
3. cp $MGC_HOME/pkgs/print_base/examples/mgc_only_model.template /net/sw/mgc/printer/model/hostname/xxx This is only needed for print to file models
4. lpadmin -pxxx -E -i/net/sw/mgc/printer/model/hostname/xxx -v/dev/null Unlike in HPUX, cupsd must be running when issue this command

Try it out with plot_test.