Article View: borland.public.cppbuilder.nativeapi
Article #15268Re: Printing Help Needed
From: Anthony
Date: Mon, 14 Jul 2003 19:27
Date: Mon, 14 Jul 2003 19:27
58 lines
3069 bytes
3069 bytes
Vladmir, I have a ribbon feed dot-matrix printer on which I need to print three different sizes of z-fold continuous-feed tractor-feed labels. None of them are a standard paper size. I have found that the following code gives me the correct paper size of the DEFAULT printer only. Printer()->PrinterIndex=selected_printer; // not default printer width = GetDeviceCaps(selected_printer->Handle, PHYSICALWIDTH); // page size x in pixels I have temporarily avioded this new problem by setting the ribbon printer to the default (which in the end application is not practical and will have to be solved. My original problem is: for example, one label size is 3.50 inches by 1 inch. Which gives 11 labels per page (the pages are 11 inches long and about 4.50 inches wide). I can print on the first label, but when I NewPage() or EndDoc() the printer feeds the next 10 labels without printing on them (in other words the printer moves to the top of the next 11" page), it then prints on the first label of the next page. I am going to try working with the DEVMODE structure, but I can find very little documentation on how. Anthony "Vladimir Afanasyev" <avv@systema.kiev.ua> wrote in message news:3f12685b$1@newsgroups.borland.com... > > Hi Anthony, > > "Anthony" <awhitesell@attbi.com> wrote: > >Vladimir, > > > >It did not work. Both NewPage() and EndDoc() feed 11 inches before printing > >the next label. > > > >Any one have any more ideas? > > > > May be we do not understand your problem. > So again from begin. > You have printer with standard size (A4) and try to > print labels on it, right? > Or you have "ribbon" printer? > > In first case you can set size of page as standard and > print labels on page without EndDoc and NewPage (just as > Bob suggested). > > In second you can try to use WritePrinter Win32 API function > that sends data directly on printer (including escape function > as JD said). > > Vladimir.
Technical Details
Message-ID:
<3f1305bf@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f0e1961$1@newsgroups.borland.com> <3f0ea18e$1@newsgroups.borland.com> <3f0f1830@newsgroups.borland.com> <3f11c5bc$1@newsgroups.borland.com> <3f12685b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,82770ce634808d90 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-14 12:40:30 PST From: "Anthony" <awhitesell@attbi.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f0e1961$1@newsgroups.borland.com> <3f0ea18e$1@newsgroups.borland.com> <3f0f1830@newsgroups.borland.com> <3f11c5bc$1@newsgroups.borland.com> <3f12685b$1@newsgroups.borland.com> Subject: Re: Printing Help Needed Date: Mon, 14 Jul 2003 15:27:41 -0400 Lines: 60 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: 24.128.134.183 Message-ID: <3f1305bf@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1058211263 24.128.134.183 (14 Jul 2003 12:34:23 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail