Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: David Nugent , djgpp AT delorie DOT com Date: Tue, 16 Feb 1999 15:22:40 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Help with sending a file to a printer. In-reply-to: <36C95237.C81A112D@cbhc.ns.ca> X-mailer: Pegasus Mail for Windows (v2.54) Reply-To: djgpp AT delorie DOT com David Nugent wrote: > Anyone have any ideas why this doesn't work properly: > > I have a file called TEST.PRN I created it by printing to > a file (through Windows), instead of to the LPT1: > port. > > If I go to DOS and type > > COPY /B TEST.PRN LPT1: (/B is for Binary) > > It prints perfect. If I try however > > ////////////////////////////// > #include "stdio.h" > main() > { > FILE *in; > int c; > in=fopen("TEST.PRN","rb"); > while((c=fgetc(in))!=EOF) fputc(c,stdprn); > fclose(in); > exit(0); > } > ////////////////////////////// > > This sends the file to my printer, but it seems all > garbled?? Any idea why this doesn't work right? What printer are you using? Is a new model? Does it support DOS or is a "WinPrinter"? Hewlett Packard have some printers (very new models) that only work unde Windows, a lot of job was moved to the PC software, that's the current trend, this year the WinModems will become more CPU intensive with the new codecs system specification by Intel. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(5411) 4759 0013