MATLAB: How to force MATLAB to use a different printer manager on a UNIX machine

custommanagerMATLABprinterprintplot

I would like to use my own printer manager in MATLAB. That is, when I select "File->Print" from the Menu Bar, either in figures or in the Editor, I would like my specific printer manager application to be used rather than the standard print dialog box.

Best Answer

In order to connect a printer manager to MATLAB and see this tool from the default printer list, set in a terminal window the following variable:
Using bash shell :
PRINTER = $PRINTER/bin/printplot.pl
export PRINTER
Using csh shell :
setenv PRINTER $PRINTER/bin/printplot.pl
where $PRINTER represents the directory where your external printer manager is installed and where "printplot" refers to the custom printer manager.
This modification will modify the variable filled in the print dialog box opened by the editor, figures or siImulink models.
On each end-user workstation, you need to declare a symbolic link to redirect the standard Unix print commands "lp" and "lpr" to the custom printer manager. You can find below the expected result when you successfully create a symbolic link to your external device driver :
which lp : /usr/bin/lp
ll /usr/bin/lp
lrwxrwxrwx 1 root other 35 Oct 11 09:07 /usr/bin/lp ->
/logiciel/gxnetclt/bin/printplot.pl
which lpr : /usr/ucb/lpr
ll /usr/ucb/lpr
lrwxrwxrwx 1 root other 35 Oct 11 09:07 /usr/ucb/lpr ->
/logiciel/gxnetclt/bin/printplot.pl
For more information on creating symbolic links please consult the documentation by executing the following command in a terminal window :
man ln