Fro a long time, we have used stand-alone printers and we sometimes use some small programs to send control codes to these printers. I am now being networked. How do you open an output stream to a network printer?
Roger Lampert
Welcome to our forums
Fro a long time, we have used stand-alone printers and we sometimes use some small programs to send control codes to these printers. I am now being networked. How do you open an output stream to a network printer?
Roger Lampert
You could start at the URL http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinpro02/html/w9p0102.asp
Basically you need to find a way to bypass the Windows spooler. One way is to make a call to the Windows API function CreateFile but I cannot remember where to find the 'file name' to use for a given printer.
If you can find the appropriate name, there is just the chance that you may be able to print to the 'file' using standard Fortran but this is a long shot.
I have tried the following code
OPEN(8,FILE='ipp://<printer details go here>') WRITE(8,*) 'Hello World' CLOSE(8) END
I used the 'file name' ipp://... obtained from the 'Printers and Faxes' dialog under Properties and Ports.
This does not work but it appears to be close because a relevant failure message is reported.