Welcome to iraf.net Monday, May 13 2024 @ 03:24 PM GMT
cbender |
02/08/2008 05:30PM (Read 3207 times)
|
|
|
Status: offline
Registered: 04/11/2007
Posts: 4
|
Hi -I'm running iraf 2.12.2a under RHEL5.Is there a way to get lprint to dump to a postscript file instead of a printer (similar to the ':.snap psdump' functionality for graphics devices)? Currently, lprint will print just fine to my default printer (e.g. cl> help apextract | lprint). However, on a laptop the default printer may not mean much, so having an actual postscript file that I can work with directly from the linux command prompt would be nice I've skimmed through the termcap file, but must have missed a psdump equivalent device if it is there. Thanks
Chad Bender
|
|
|
|
fitz |
02/08/2008 05:30PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
LPRINT is basically a front-end to the host lp/lpr commands that allows you to queue files to a particular printer. To create postscript from plain text you would need to instead use a program like 'enscript' as part of the termcap DD string. For example, you could add a device entry to dev$termcap such as:[code:1:a9ef534ce8]
psdump|Generic PS file dump:co#80:li#66:os:pt:ta^I:\
:DD=apple,/tmp/asfXXXXXX,!{ enscript -p - $F > /tmp/psdump.ps; rm $F; }:
[/code:1:a9ef534ce8]This would turn the text file into a PS file called /tmp/psdump.ps but note it assumes you've got the 'enscript' task installed on your system. Once you've edited the termcap file, do a 'flpr 0' (zero not oh).-Mike
|
|
|
|
cbender |
02/08/2008 05:30PM
|
|
|
Status: offline
Registered: 04/11/2007
Posts: 4
|
Thanks - that works great.
|
|
|
|
fitz |
02/08/2008 05:30PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
BTW, I should have mentioned that HELP will generate PostScript directly that you can save to a file (e.g. "help prow dev=ps > prow.ps"). The enscript termcap thing is only needed for plain text files, for HELP the PS created by the task is better than the enscripted text version.-Mike
|
|
|
|
| |
|
Content generated in: 0.14 seconds |
|