Archive for the ‘Printing’ Category

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.

With the installation of the latest version of the Mentor software on the HP machines, the option for printing directly to a pdf is present. This needs to get set up. It is basically the same procedure as on linux, but paths to files have changed.

-Make sure ghostscript is installed

-Location for printer stuff: /net/sw/mgc_hpux/printer/export_pdf

-Copy the export_pdf directory from impulse to any other machine that needs it.

-Copy the following files to the above location:
cp $MGC_HOME/shared/pkgs/pdf_export/templates/mgc_pdf_config .
cp $MGC_HOME/shared/pkgs/pdf_export/templates/mgc_pdf_fis .
cp $MGC_HOME/shared/pkgs/pdf_export/templates/pet .

-Make sure mgcgs and mgcgs.ixn have execute permissions (and yes, can use mgcgs.ixn here because it’s just a script). I could rename it to mgcgs.hpu, but I want to remember that this is the same program that’s running on linux.

Edit /usr/local/share/ghostscript/7.07/lib/Fontmap.GS and add the following to the end of the file:

% Mentor fonts
/stroke-bs (mgc_stroke_bs.afm);
/mgc-v1-stroke (mgc-v1-stroke.afm);
/stroke (mgc_stroke.afm);
/stroke-bs (mgc_stroke_bs.pfa);
/mgc-v1-stroke (mgc-v1-stroke.pfa);
/stroke (mgc_stroke.pfa);

-Set MGC_GS_PATH=/net/sw/mgc_hpux/printer/export_pdf

-Set MGC_PDF_OPTIONS=/net/sw/mgc_hpux/printer/export_pdf

-Set MGC_PLOT_OPTIONS=/net/sw/mgc_hpux/printer (location of pet file)
-Set AMPLE_PATH=$AMPLE_PATH:$MGC_PDF_OPTIONS

-In linux, the following was added to the pet file. In HPUX, it won’t work if this is added, so leave it out.

extern PDFExportAppTable = [
“export pdf”,
“$MGC_PDF_OPTIONS/mgc_pdf_fis”,
“.pdf”,
“”,
“”
];

Mentor Graphics printers need to be added to each computer in the shop. The command to run is “filter_setup”. It should be on the PATH. Otherwise, it’s located here:

$MGC_HOME/bin/filter_setup

All of the fis and config files have been created and are in /net/sw/mgc/printer/[fis,configs]. So when running filter_setup, choose “Add Printer”. Fill in the fields and press ok. If making changes to a printer already created, be sure to check the replace button. This command then sets the printer up in cups.

Finally, Mentor Graphics has a way to print directly to a pdf file. It’s a bit complicated, but it does work. The details are in TechNote mg52323, but here’s what’s needed.

-Install Ghostscript

-Create a central location for configuration files, here, it’s /net/sw/mgc/printer. So $MGC_PDF_OPTIONS=/net/sw/mgc/printer/export_pdf (create export_pdf in next step)

-Put this directory (export_pdf) in the above location.

-Copy the following files to the above location:
cp $MGC_HOME/shared/pkgs/pdf_export/templates/mgc_pdf_config .
cp $MGC_HOME/shared/pkgs/pdf_export/templates/mgc_pdf_fis .
cp $MGC_HOME/shared/pkgs/pdf_export/templates/pet .

-Make sure mgcgs and mgcgs.ixn have execute permissions

-Edit /usr/share/ghostscript/7.05/lib/Fontmap.GS and add the following to the end of the file:

% Mentor fonts
/stroke-bs (mgc_stroke_bs.afm);
/mgc-v1-stroke (mgc-v1-stroke.afm);
/stroke (mgc_stroke.afm);
/stroke-bs (mgc_stroke_bs.pfa);
/mgc-v1-stroke (mgc-v1-stroke.pfa);
/stroke (mgc_stroke.pfa);

-Set MGC_GS_PATH=/net/sw/mgc/printer/export_pdf

-Set MGC_PDF_OPTIONS=/net/sw/mgc/printer/export_pdf

-Edit pet file and add this:

extern PDFExportAppTable = [
“export pdf”,
“$MGC_PDF_OPTIONS/mgc_pdf_fis”,
“.pdf”,
“”,
“”
];

In order to set up printers for Mentor Graphics, you have to allow for raw printing. This is done by editing the files /etc/cups/mime.types and /etc/cups/mime.convs. The following lines must NOT be commented out:

mime.convs:
application/octet-stream application/vnd.cups-raw 0

mime.types:
application/octet-stream

That was easy enough. But if you use system-config-printer or redhat-config-printer to set up your printers, these lines automatically get recommented out. So, it’s probably best to NOT use the redhat config programs and stick with using a browser at localhost:631 to configure printers.

To add printers to Mentor Graphics, create the fis and config files in /net/sw/mgc/printer/[config,fis]
for each printer.  Edit the pet file in /net/sw/mgc/printer/config/pet to show the new printer.  Note that MGC_PLOT_OPTIONS should be set to /net/sw/mgc/config/printer so that it can find the pet file.  It’s located here, so printers only have to be set once for all machines.  With linux, a problem arose that raw printing was not enabled by default.  According to technote mg44859, must edit the files /etc/cups/[mime.types,mime.conv] and uncomment out the lines application/octet-stream.  Restart cups and plot_test should work.

Our hp 5200dtn printer works with RHEL3, provided that the generic postscript driverHP 5100 driver is used. Also, it needs to be configured to do duplexing. That’s it.