Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing from within C App Issue

Status
Not open for further replies.

keithvb

Programmer
Dec 2, 2001
2
US
Using DJGPP in DOS shell under Win98.
The application is menu driven.

When I send lines to a printer
Code:
           fputs( string, printer);
nothing happens until I exit from my app. Then printing occurs perfectly.

Any idea what is holding up my printing?

 
keith,

You need to flush the output buffer. Use

fflush(printer)

Brudnakm
 
Brudnakm,

Thanks for the response. I've tried
Code:
fflush(printer)
and it makes no difference.

I've done more digging/thinking abt the issue:
This is network printing.
If I wait abt 3 minutes the printing occurs even if I don't exit the app.

So:
I'm going to try creating the print routines as separate apps that I can call from my main app.

Think it'll work?

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top