Article View: borland.public.cppbuilder.nativeapi
Article #12566Re: Windows Printers
From: John Scott
Date: Wed, 03 Dec 2003 17:38
Date: Wed, 03 Dec 2003 17:38
59 lines
3491 bytes
3491 bytes
I am getting ready to try it this way. I am having a problem assigning the
value to the dmDuplex value in the DEVMODE structure. The following code
gives me an error Pointer to structure required on left side of -> or ->*
char ADevice[256]={0}, ADriver[256]={0}, APort[256]={0};
THandle ADeviceMode;
Printer()->GetPrinter(ADevice, ADriver, APort, ADeviceMode);
if (rgDuplex->ItemIndex==0)
{
ADeviceMode->dmDuplex=DMDUP_VERTICAL; // Error here
//ADeviceMode.dmDuplex=DMDUP_VERTICAL; // Also gives Error here
}
else
{
ADeviceMode->dmDuplex=DMDUP_SIMPLEX; // Error also here
}
Printer()->SetPrinter(ADevice, ADriver, APort, ADeviceMode);
One final thing how does Printer()->NewPage; differ from the StartPage() and
EndPage()?
Thanks again John
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
news:eipnsvs99q92prau97tl685lua6crv6e92@4ax.com...
> John Scott wrote:
>
> >The problem is that I need to print on both sides of the card. Once I
have
> >printed the first side how do I get it to change to the second side so
that
> >i can print the second page?
>
> If you have duplexing turned on, doesn't the printer print the second
> page on the back by itself? ie.
> StartPage()
> Print("PageOne");
> EndPage()
> StartPage()
> Print("Page Two");
> EndPage();
> Yes, reading the PCL5 manual, page 4-12 shows
> Esc & a # G
> which is not what you want. That command ejects the current paper and
> moves to either the front of the back of the next sheet. So, if you
> tried to use that to print the second side after printing the first,
> you would end up with two sheets, one printed on the front only, the
> other on the back only.
>
> On page 4-6 is the command
> Esc & l # S
> which selects Simplex, Duplex-Long or Duplex-Short, which are the same
> options as are available in the DEVMODE.
> I'm pretty sure setting the DEVMODE for duplex and printing with the
> above outline will get you your results.
> Note that if the printer doesn't support duplex, you will print two
> cards, one with the front info, and one with the back.
>
>
Technical Details
Message-ID:
<3fce1fed@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fbcf9c2@newsgroups.borland.com> <3fbd8132$1@newsgroups.borland.com> <3fc77301@newsgroups.borland.com> <3fc7e524$1@newsgroups.borland.com> <3fca2474@newsgroups.borland.com> <3fcb2567$1@newsgroups.borland.com> <3fcb6984@newsgroups.borland.com> <goumsvolftvangoh1n8i7ktptavi57ut2d@4ax.com> <dsvmsvo53afn3qqk6p2ir6ld5lldimucju@4ax.com> <3fcb93d8@newsgroups.borland.com> <eipnsvs99q92prau97tl685lua6crv6e92@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7b2449597708bec X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-03 10:09:50 PST From: "John Scott" <jscott@kw.igs.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fbcf9c2@newsgroups.borland.com> <3fbd8132$1@newsgroups.borland.com> <3fc77301@newsgroups.borland.com> <3fc7e524$1@newsgroups.borland.com> <3fca2474@newsgroups.borland.com> <3fcb2567$1@newsgroups.borland.com> <3fcb6984@newsgroups.borland.com> <goumsvolftvangoh1n8i7ktptavi57ut2d@4ax.com> <dsvmsvo53afn3qqk6p2ir6ld5lldimucju@4ax.com> <3fcb93d8@newsgroups.borland.com> <eipnsvs99q92prau97tl685lua6crv6e92@4ax.com> Subject: Re: Windows Printers Date: Wed, 3 Dec 2003 12:38:36 -0500 Lines: 61 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 216.16.227.112 Message-ID: <3fce1fed@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070473197 216.16.227.112 (3 Dec 2003 09:39:57 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail