• Post Reply Bookmark Topic Watch Topic
  • New Topic

Completing Print Function  RSS feed

 
Danny Carson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

I have written a small app that utilises a socket and an outputfilestream in order to print a file to a network printer.

The problem is that when I have sent the data to the printer it is stored in the printers memory and does not print until I press the 'Go' button on the printer.

When I send data from a telnet session I have to end the process with '^]' as an escape character but I dont know if this must be done in my app too.

All help much appreciated

DC
 
T.A. Nguyen
Ranch Hand
Posts: 36
Eclipse IDE Java ME Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without codes, I can not tell. But most likely, you are not closing the print stream and so, the printer driver still waiting for the end of transaction to start printing.

Post the codes if you want me to look more into it.
 
Danny Carson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks for the reply. I am closing the printStream just not sure why it still dont work.

 
T.A. Nguyen
Ranch Hand
Posts: 36
Eclipse IDE Java ME Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, I added output.flush() before closing and that fix it.

have fun,

[ September 04, 2008: Message edited by: T.A. Nguyen ]
[ September 04, 2008: Message edited by: T.A. Nguyen ]
 
Danny Carson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply, but it did not work on the printer im trying to print to.

It may just be this printer.

Thanks again.
 
john mayer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for helping
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!