Archive for the ‘Printing’ Category

I had a problem where one user could not print in BoardStation. The problem was that nothing happened when they went to print. It turned out to be a problem for me as well. I had one other user on a different computer that didn’t have this problem. So I made sure that all the same packages were installed on both computers and that the same settings were used. It didn’t matter, the ezprint window would not pop up in any BoardStation program.

After a day of messing around with things, I finally found the problem was in the setting of LD_LIBRARY_PATH. If I included the directory containing the library that specctra needed (/net/sw/cadence/spb/spb16.5/tools.lnx86/lib) then the print file wouldn’t appear. If I took that library out, the print window popped up without a problem.

Unfortunately, without that library, the specctra program would not run. And both of our engineers still use specctra for routing. So I wanted to get both programs working correctly at the same time.

The solution was to add /lib and /usr/lib to the beginning of the LD_LIBRARY_PATH environment variable. So now my LD_LIBRARY_PATH variable looks like this:

$ printenv LD_LIBRARY_PATH
/lib:/usr/lib:/net/sw/cadence/spb/spb16.5/tools.lnx86/lib:/usr/lib64/root:/net/sw/wxWidgets-2.8.12/x64/lib

and both programs work correctly.

Here is how to set up the HP DesignJet 800 PS in linux. We’re using RHEL4 and 5, but I think this would work on just about any linux distribution.

  1. Download HP_Designjet_800_PS3.ppd.gz
  2. Copy the file to /usr/share/cups/model
  3. Delete the old plotter
    lpadmin -x plotter
    
  4. Create the new printer
    lpadmin -p plotter -E -v socket://edg3:9100 -P /usr/share/cups/model/HP_Designjet_800_PS3.ppd.gz
    
  5. Check that have the proper options
    [me@computer ~]$ lpoptions -p plotter -l
    HPPantone/Automatic PANTONE(R) Calibration: False *True
    HPBlackBrightness/Black Lightness: levelm25 levelm20 levelm15 levelm10 levelm5 *leveleven levelp5 levelp10 levelp15 levelp20 levelp25
    HPColorMan/Color Management: *Native Emulation
    HPCyanBrightness/Cyan Lightness: levelm25 levelm20 levelm15 levelm10 levelm5 *leveleven levelp5 levelp10 levelp15 levelp20 levelp25
    HPCMYKEmulation/HP CMYK Emulation: *None SWOP JapanOffset EuroOffset DIC
    HPRGBEmulation/HP RGB Emulation: *None sRGB AdobeRGB AppleRGB ColorMatchRGB
    HPMagentaBrightness/Magenta Lightness: levelm25 levelm20 levelm15 levelm10 levelm5 *leveleven levelp5 levelp10 levelp15 levelp20 levelp25
    HPMaxDetail/Maximum Detail: True *False
    MirrorPrint/Mirror Print: True *False
    HPCadDrawings/Optimized for CAD: True *False
    HPColorAsGray/Print Color as Gray: Yes *No
    HPIntent/Rendering Intent: *Perceptual Colorimetric Saturation
    HPTransverse/Rotate: True *False
    HPAutoScaling/Scale to: *Off Letter Tabloid AnsiC AnsiD AnsiE ARCHA ARCHB ARCHC ARCHD ARCHE A4 A3 A2 A1 A0 B4 B3 B2 B1 P24x48 P24x60 P36x60 P36x72 P42x60 P42x72 P42x84
    HPYellowBrightness/Yellow Lightness: levelm25 levelm20 levelm15 levelm10 levelm5 *leveleven levelp5 levelp10 levelp15 levelp20 levelp25
    PageSize/Media Size: Letter Tabloid AnsiC AnsiD AnsiE ARCHA ARCHB ARCHC ARCHD ARCHE A4 A3 A2 A1 A0 B4 B3 B2 B1 P24x48 P24x60 P36x60 P36x72 P42x60 P42x72 P42x84 Custom
    PageRegion/PageRegion: Letter Tabloid AnsiC AnsiD AnsiE ARCHA ARCHB ARCHC ARCHD ARCHE A4 A3 A2 A1 A0 B4 B3 B2 B1 P24x48 P24x60 P36x60 P36x72 P42x60 P42x72 P42x84
    OutputMode/Print Quality: Fast *Normal Best
    HPPageANSI/ANSI (A,B,...): *True False
    HPPageARCH/Architectural: *True False
    HPPageDIN/DIN (C4,C3,...): *True False
    HPPageISO/ISO (A4,A3,...): *True False
    HPPageJIS/JIS (B4,B3,...): *True False
    

Since Mentor Graphics sets everything in its config and fis files, there isn’t anything to change there. For Cadence, our site file is in /net/sw/cad.rh/ic/ic5141/tools/plot/.cdsplotinit. For C- and D-sized plots, the entries are:

Plotter_C|Hewlett-Packard DesignJet 5000PS (Postscript): \
	:manufacturer=Hewlett-Packard: \
	:type=postscript2: \
	:spool="lp -dplotter -oPageSize=AnsiC": \
	:query=lpstat -oplotter: \
	:remove=cancel $1 plotter: \
	:resolution#1200: \
	:maximumPages#30: \
	:paperSize="C portrait" 19800 25800 300 300: \
	:paperSize="C landscape" 25800 19800 300 300:

Plotter_D|Hewlett-Packard DesignJet 5000PS (Postscript): \
	:manufacturer=Hewlett-Packard: \
	:type=postscript2: \
	:spool="lp -dplotter -oPageSize=AnsiD": \
	:query=lpstat -oplotter: \
	:remove=cancel $1 plotter: \
	:resolution#1200: \
	:maximumPages#30: \
	:paperSize="D portrait" 25800 40200 300 300: \
	:paperSize="D landscape" 40200 25800 300 300:

System Error 22:10
Call HP Support

Take out all the print cartridges and check them. Our problem was that the magenta cartridge was leaking. After cleaning up all the ink and replacing the magenta cartridge, everything worked again.

Printers [A-D]_file on HP were readded (due to upgrade of Mentor software) in basically the same manner as on linux.

Printing Home: /net/sw/mgc_hpux/printer

Config files: configs/hostname
Fis files: fis/hostname
Model files: model/hostname

lpshut
lpadmin -pA_file -i/net/sw/mgc_hpux/printer/model/amp/A_file -v/dev/null
lpsched
enable A_file
accept A_file

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.