Re: Can you print directly to the default printer?

2001-05-15 Thread RICHARD A. NAKROSHIS (Contractor)

King, Jason wrote:
 
 if I were you - I'd use Word (or some other printer enabled program) to
 print .. notepad for example has a /p option .. so you can write a temporary
 file and print it using notepad (which will use the default printer)
 
 none of the solutions are very tidy

I'm the one that started this thread, and using an editor with a /p
print switch is what I tried to do originally.  

Example batch file:

PERL myscript.pl
NOTEPAD /p printme.txt

Run from a batch file, Windows will probably try running notepad before
the script has had a chance to finish creating printme.txt.  Thus, I
wanted to try having the script print the output file itself to avoid
this problem.


RE: Can you print directly to the default printer?

2001-05-15 Thread McCollum Michael L Contr 96 CG/SCTXD


King, Jason wrote:
 
 if I were you - I'd use Word (or some other printer enabled program) to
 print .. notepad for example has a /p option .. so you can write a
temporary
 file and print it using notepad (which will use the default printer)
 
 none of the solutions are very tidy

I'm the one that started this thread, and using an editor with a /p
print switch is what I tried to do originally.  

Example batch file:

PERL myscript.pl
NOTEPAD /p printme.txt

Run from a batch file, Windows will probably try running notepad before
the script has had a chance to finish creating printme.txt.  Thus, I
wanted to try having the script print the output file itself to avoid
this problem.


Why not just do a system call from inside the perl script after you have
closed the txt file.

system NOTEPAD /p printme.txt;



RE: Can you print directly to the default printer?

2001-05-14 Thread King, Jason

Amarnath Honnavalli Anantharamaiah writes ..

It is quite interesting. I am curious to know how do you print to a
network printer ? Please excuse me if I am asking a dumb question.


never had to .. if I had to I'd probably want to format the printed output a
little better than ASCII can do .. so I'd probably use OLE to setup a Word
document and print from Word (I'm assuming - of course - that we're still
talking Win32 as per the original query)

there's a Net::Printer module available on CPAN for UNIX line printers ..
talks to port 515 on the network printer .. this might work for Win32
printers .. but I doubt it .. and even if it did - then it's unlikely to be
pretty

if I were you - I'd use Word (or some other printer enabled program) to
print .. notepad for example has a /p option .. so you can write a temporary
file and print it using notepad (which will use the default printer)

none of the solutions are very tidy

-- 
  jason king

  In South Carolina, merchandise may not be sold within a half mile of
  a church unless fruit is being sold. - http://dumblaws.com/