Message-ID: <36B370B5.817AE3CA@net4you.co.at> Date: Sat, 30 Jan 1999 21:51:01 +0100 From: Seawolf X-Mailer: Mozilla 4.07 [de] (Win98; I) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie stdprn References: <36B33A58 DOT DF604C5D AT castle DOT on DOT ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 194.177.154.104 X-Trace: 30 Jan 1999 21:50:22 +0100, 194.177.154.104 Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > Look at this code: > > while(pch_ptr = fgets(buf , sizeof(buf) , file_ptr)) > { > fputs(pch_ptr, stdprn); //Prints pointer to screen > } > > It prints to the printer like this: > > line one > next line down and over > next line down and > over again. > > Any ideas? At the moment you're writing these strings to stdprn: "line one\n", "next line down and over\n", "next line down and\n", "over again\n". Just append a CR character ( '\r') to each string before sending it to the printing device. ie. "line one\n\r", "next line down and over\n\r", ...