Article View: borland.public.cppbuilder.nativeapi
Article #14686Re: how to print a string directly to a printer using "fprintf" or "printf" ?
From: Remy Lebeau (TeamB)
Date: Wed, 06 Aug 2003 19:09
Date: Wed, 06 Aug 2003 19:09
25 lines
1865 bytes
1865 bytes
"Richard Yu" <richard@colorselector.com> wrote in message
news:3f314de8@newsgroups.borland.com...
> in console application, printf sends the string to screen
That is not entirely accurate. The printf() function sends the string to
STDOUT. If you happen to run the application from a command prompt without
any redirection, then the console screen will be the STDOUT. If, however,
you run the application and redirect its output to somewhere else, then
STDOUT will go to that new destination, ie:
// outputs to the console screen
C:\> myapp
// outputs to the standard printer
C:\> myapp > prn
> how can I send them to printer ?
If you want to output to the printer regardless of redirection, then you'll
just have to access the printer directly.
Gambit
Technical Details
Message-ID:
<3f315101$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f314de8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,ff83352b6b456ff2 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-06 12:11:30 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f314de8@newsgroups.borland.com> Subject: Re: how to print a string directly to a printer using "fprintf" or "printf" ? Date: Wed, 6 Aug 2003 12:09:48 -0700 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f315101$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060196609 207.175.226.26 (6 Aug 2003 12:03:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail