From: pjfarley AT dorsai DOT org (Peter J. Farley III) Newsgroups: comp.os.msdos.djgpp Subject: Re: Printing on the printer Date: Wed, 24 Sep 1997 01:57:06 GMT Organization: None Lines: 28 Message-ID: <342872c0.5802270@snews.zippo.com> References: <34282F89 DOT B19A9F61 AT netcom DOT ca> NNTP-Posting-Host: news.newsdawg.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk jb AT netcom DOT ca wrote: >I was wondering, what C code do you need to write, to make your program >print what you want it to, during runtime? (besides pushing the Print >Scrn key) Use "PRN:" as the filename. Try this: #include #include main() { FILE *prntr; if ((prntr = fopen("PRN:", "w")) == NULL) { printf("Error %d! %s: %s\n", errno, "PRN:", strerror(errno)); exit(1); } fprintf(prntr, "This appears on the printer,\nthen a page feed\f"); fflush(prntr); fclose(prntr); exit(0); } ---------------------------------------------------- Peter J. Farley III (pjfarley AT dorsai DOT org)