Mattias,
I still am having troubles (I guess I don't understand how to get
reading from the printer), although writeprinter is working. Here is my
code that is not showing anything that I know is waiting to be sent from
the printer:
string reaDstrinG = "";
int buf = 0;
int pcRead;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
PrintDirect.OpenPrinter(@"\\Web1\Shipping1",ref lhPrinter,0);
for (int i = -1; i < 23; i++)
{
PrintDirect.ReadPrinter(lhPrinter, sb.Append(reaDstrinG), buf, out
pcRead);
// PrintDirect.ReadPrinter(lhPrinter,reaDstrinG,buffLength,ref
pcRead);
}
Here is what is sent to the printer before this code (this is for a
status report on paper, staples and toner):
st1 = "\x1b%-12345X@PJL \f" +
"@PJL COMMENT ***Inquiring About \f" +
"@PJL COMMENT Environment Settings*** \f" +
@"@PJL ECHO " + formaTtd + " \f" +
"@PJL INQUIRE INTRAY2 \f" +
"@PJL INQUIRE INTRAY3 \f" +
"@PJL INQUIRE INTRAY4 \f" +
"@PJL INQUIRE STAPLER \f" +
"@PJL INQUIRE TONNER \f" +
"@PJL INQUIRE TIMEOUT \f" +
"@PJL ENTER LANGUAGE=PCL \f" +
"\x1b%-12345X\f";
Any help is really appreciated.
Thanks,
Trint
..Net programmer
(E-Mail Removed)
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!