Re: Printing PS Files on Windows Machines [message #12593] |
Tue, 25 August 1998 00:00  |
Stubbe Faurschou Hvii
Messages: 2 Registered: January 1996
|
Junior Member |
|
|
Hi
If you simply want to dump a file to the printer (PS or otherwise) here is
a small IDL program that does the job:
(without using the spawn procedure)
PRO print_file, filename, PORT=PORT
if n_elements(PORT) eq 0 then PORT='lpt1'
; *** read file into buffer
openr, unit_read, filename, /GET_LUN
fs = fstat(unit_read)
buffer=bytarr(fs.size)
readu, unit_read, buffer
close, unit_read, /all
free_lun, unit_read
print, 'sending ', fs.size, ' bytes to ', PORT
; *** write buffer to PORT
openw, unit_write, PORT, /GET_LUN
writeu, unit_write, buffer
close, unit_write
free_lun, unit_write
END
You set the print port using the keyword PORT='port name'. The default port
is 'lpt1' but it can be set to anything.
Stubbe
davidf7203@my-dejanews.com wrote:
> Hi Folks,
>
> I wanted to follow up on a discussion last week about
> printing PostScript files on Windows machines. Here is
> the URL to a small freeware utility program named
> PrintFile that I think is terrific. You can set it up
> to be a drag and drop operation, or you can simply
> Spawn the program from within IDL (use the "start"
> command if you are on Windows NT to avoid the program
> blocking the IDL command line).
>
> http://hem1.passagen.se/ptlerup/prfile.html
>
> The author of this program, Peter Lerup, also wrote
> the useful PS2EPS program for the Macintosh.
>
> Cheers,
>
> David
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
--
---------------------------------------------------------
Stubbe Faurschou Hviid tlp. (+45) 35 32 04 15
University of Copenhagen fax. (+45) 35 32 04 60
Niels Bohr Institute
�rsted Laboratory Email: stubbe@fys.ku.dk
Universitetsparken 5 WWW: http://ntserv.fys.ku.dk/mars.htm
DK-2100 Copenhagen �
Denmark
|
|
|