View previous topic :: View next topic |
Author |
Message |
RogerLampert
Joined: 11 May 2005 Posts: 12
|
Posted: Wed May 11, 2005 3:23 am Post subject: Printing to a network |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7931 Location: Salford, UK
|
Posted: Wed May 11, 2005 6:30 am Post subject: Printing to a network |
|
|
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. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7931 Location: Salford, UK
|
Posted: Thu May 12, 2005 3:38 am Post subject: Printing to a network |
|
|
I have tried the following code
OPEN(8,FILE="ipp://<printer details go here>")
WRITE(8,*) "Hello World"
CLOSE(
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. |
|
Back to top |
|
|
|