delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/16/13:18:15

Message-Id: <m10Cp0V-000S2TC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: David Nugent <davidn AT cbhc DOT ns DOT ca>, djgpp AT delorie DOT com
Date: Tue, 16 Feb 1999 15:22:40 +0000
MIME-Version: 1.0
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 <davidn AT cbhc DOT ns DOT ca> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019