Mail Archives: djgpp/1999/02/16/12:37:17

Message-ID: <>
From: David Nugent <davidn AT cbhc DOT ns DOT ca>
X-Mailer: Mozilla 4.04 [en] (WinNT; U)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Help with sending a file to a printer.
X-Corel-MessageType: EMail
Lines: 32
Date: Tue, 16 Feb 1999 11:10:47 +0000
X-Trace: 919185065 (Tue, 16 Feb 1999 13:11:05 ADT)
NNTP-Posting-Date: Tue, 16 Feb 1999 13:11:05 ADT
Organization: Business Internet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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:

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"
FILE *in;
int c;
while((c=fgetc(in))!=EOF)  fputc(c,stdprn);

This sends the file to my printer, but it seems all
garbled?? Any idea why this doesn't work right?

Appreciate any information.
Dave Nugent

- Raw text -

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