Welcome to iraf.net Monday, May 13 2024 @ 03:24 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 lprint dump to ps file?
   
cbender
 02/08/2008 05:30PM (Read 3207 times)  
+----
Newbie

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

 
Profile Email
 Quote
fitz
 02/08/2008 05:30PM  
AAAAA
Admin

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

 
Profile Email
 Quote
cbender
 02/08/2008 05:30PM  
+----
Newbie

Status: offline


Registered: 04/11/2007
Posts: 4
Thanks - that works great.

 
Profile Email
 Quote
fitz
 02/08/2008 05:30PM  
AAAAA
Admin

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

 
Profile Email
 Quote
   
Content generated in: 0.14 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login