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

Home » Public Forums » archive » Printing a text file.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Printing a text file. [message #28330] Tue, 04 December 2001 09:40 Go to next message
john.copley is currently offline  john.copley
Messages: 8
Registered: October 2001
Junior Member
I am looking for ways to print an ascii text file from within an IDL
application. I need to be able to do this for unix, windows and macos.
Unix is not a problem: I spawn a command such as "lpr -Plp0 filename".
With Windows the best I have been able to come up with is to spawn a
command such as "c:\windows\notepad.exe /p filename" which is not very
elegant (and nor is the printout). I haven't yet investigated
possibilities for macos.

Also does anyone know of a way to attach the date and time to
printouts of IDL source code? I get very confused when I have multiple
printouts and do not know which is the latest version.

Your comments are appreciated.
John Copley
Re: Printing a text file. [message #28393 is a reply to message #28330] Wed, 05 December 2001 16:45 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
Mark Rivers wrote:
>
> John Copley <john.copley@nist.gov> wrote in message
> news:cf9627bd.0112040940.4d2a9de7@posting.google.com...
>> I am looking for ways to print an ascii text file from within an IDL
>> application. I need to be able to do this for unix, windows and macos.
>> Unix is not a problem: I spawn a command such as "lpr -Plp0 filename".
>> With Windows the best I have been able to come up with is to spawn a
>> command such as "c:\windows\notepad.exe /p filename" which is not very
>> elegant (and nor is the printout). I haven't yet investigated
>> possibilities for macos.
>
> With Windows I print Postscript files by spawning "print
> /d:\\server_name\printer_share_name file_name.ps"
>
> You should be able to do the same with text files.
>
> Mark Rivers

Hi Mark,

My original text printing macro written for Win 95/98 was quite happy
to do this sort of thing.

But with the advent of Win2000, something in the way our printers were
set up on our Novell cluster screwed that right up. Totally bambozzled
our system guys. Hence I resorted to a third party utility, PrintFile,
to achieve what should have been so simple...

I believe DF is a great fan of PrintFile.

Andrew

------------------------------------------------------------ ---------
Andrew D. Cool .->-.
Electromagnetics & Propagation Group `-<-'
Surveillance Systems Division Transmitted on
Defence Science & Technology Organisation 100% recycled
PO Box 1500, Salisbury electrons
South Australia 5108

Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ ---------
Re: Printing a text file. [message #28411 is a reply to message #28330] Wed, 05 December 2001 06:08 Go to previous message
Mark Rivers is currently offline  Mark Rivers
Messages: 49
Registered: February 2000
Member
John Copley <john.copley@nist.gov> wrote in message
news:cf9627bd.0112040940.4d2a9de7@posting.google.com...
> I am looking for ways to print an ascii text file from within an IDL
> application. I need to be able to do this for unix, windows and macos.
> Unix is not a problem: I spawn a command such as "lpr -Plp0 filename".
> With Windows the best I have been able to come up with is to spawn a
> command such as "c:\windows\notepad.exe /p filename" which is not very
> elegant (and nor is the printout). I haven't yet investigated
> possibilities for macos.

With Windows I print Postscript files by spawning "print
/d:\\server_name\printer_share_name file_name.ps"

You should be able to do the same with text files.

Mark Rivers
Re: Printing a text file. [message #28418 is a reply to message #28330] Tue, 04 December 2001 18:28 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
John Copley wrote:
>
> I am looking for ways to print an ascii text file from within an IDL
> application. I need to be able to do this for unix, windows and macos.
> Unix is not a problem: I spawn a command such as "lpr -Plp0 filename".
> With Windows the best I have been able to come up with is to spawn a
> command such as "c:\windows\notepad.exe /p filename" which is not very
> elegant (and nor is the printout). I haven't yet investigated
> possibilities for macos.
>
> Also does anyone know of a way to attach the date and time to
> printouts of IDL source code? I get very confused when I have multiple
> printouts and do not know which is the latest version.
>
> Your comments are appreciated.
> John Copley

Hi John,

I have an IDL Macro that prints the chroma-coded IDL source code of
the active edit window under Windows IDLDE. It calls a freeware utility
to do the actual printing.

I'll email the two files and instructions direct to you, and anyone
else
who puts their paw up.

Andrew

------------------------------------------------------------ ---------
Andrew D. Cool .->-.
Electromagnetics & Propagation Group `-<-'
Surveillance Systems Division Transmitted on
Defence Science & Technology Organisation 100% recycled
PO Box 1500, Edinburgh electrons
South Australia 5108

Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ ---------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Looking for roll correction routine
Next Topic: IDLDE macro for printing chroma-colored source code

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

Current Time: Wed Oct 08 14:32:50 PDT 2025

Total time taken to generate the page: 0.00599 seconds