comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Printing within Windows environment
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Printing within Windows environment [message #12542] Thu, 20 August 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Bill Thompson (thompson@orpheus.nascom.nasa.gov) writes:

> I know this question has been asked before, but how does one send a file to the
> printer within IDL for Windows. In Unix, one would spawn the lpr command.
> I've tried spawning "PRINT <filename>", but that doesn't seem to work.

Here is a little routine that I use to print PostScript files
from within IDL on my Windows NT machine. My printer is
attached directly to my computer. The command will have
to be different, probably, for networked printers.

The other day, however, I picked up a piece of freeware
software called PrintFile from the Internet. It is great.
Nice interface (drag and drop if you like), can print
encapsulated PostScript files too, will work with networked
printers as well as non-networked, etc. Unfortunately,
the URL and other information is on my computer in the
office and I am on the road teaching this week. I'll post
the reference here when I get back to my office.

Cheers,

David

-----------------------------------------------------------
PRO PrintFile, filename

Catch, error
IF error NE 0 THEN BEGIN
ok = Dialog_Message("Sorry. Problem printing file.")
Catch, /Cancel
RETURN
ENDIF

; Send a PostScript file to the printer.

IF N_Params() EQ 0 THEN BEGIN
title = 'Open a file for PRINTING...'
filter = '*.ps'
filename = Dialog_Pickfile(Title=title, Filter=filter)
ENDIF

; Out of here if user canceled.

IF filename EQ '' THEN RETURN

; Print it.

SPAWN, 'Copy ' + filename + ' LPT1'
END
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Heterogenous data and hdf_vd_write
Next Topic: Error rendering an IDLgrModel subclass.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 00:42:36 PDT 2025

Total time taken to generate the page: 1.12145 seconds