Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages
Started by Alan Bellingham
Thu, 31 Aug 2006 14:46
Changing printer copy count mid-print
Author: Alan Bellingham
Date: Thu, 31 Aug 2006 14:46
Date: Thu, 31 Aug 2006 14:46
27 lines
2083 bytes
2083 bytes
My code is attempting to change the number of copies of a sheet printed part way through a print job. I wish to print a given page a number of times (perhaps hundreds of times), and then print a second page a single time. I can do this, but I don't have my ideal solution, which would (a) keep everything in one job, (b) not produce a spool file that grew linearly with page count, and (c) would be reliable. It's (c) that is problematic with the method I'm trying. My technique is to build a DEVMODE with the dmCopies member set to the initial count and pass that to CreateDC. I then later, between an EndPage and a following StartPage, change the dmCopies value and call ResetDC with the DEVMODE. This usually, but not always, works, and the weird thing is, when it doesn't work, it's when using a network printer rather than a local one. Does anyone have any idea what alternative mechanism I might use (excluding doing an EndDoc/StartDoc pair, which works, but causes the job to split)? Collating is *not* required. Alan Bellingham -- ACCU Conference: 11-14 April 2007 - Paramount Oxford Hotel
Re: Changing printer copy count mid-print
Author: Bob Gonder
Date: Thu, 31 Aug 2006 16:54
Date: Thu, 31 Aug 2006 16:54
7 lines
1244 bytes
1244 bytes
Alan Bellingham wrote: >My code is attempting to change the number of copies of a sheet printed >part way through a print job. My first thought is to send PCL to the printer. Tell the Printer to print the copies, instead of Windows.
Re: Changing printer copy count mid-print
Author: Alan Bellingham
Date: Thu, 31 Aug 2006 19:24
Date: Thu, 31 Aug 2006 19:24
25 lines
1861 bytes
1861 bytes
Bob Gonder <notbg@notmindspring.invalid> wrote: >Alan Bellingham wrote: > >>My code is attempting to change the number of copies of a sheet printed >>part way through a print job. > >My first thought is to send PCL to the printer. >Tell the Printer to print the copies, instead of Windows. Some of these printers are ZPL. Or CPCL. Or other weirdo languages. (Writing PS or PCL direct is not something that scares me, but the infrastructure of working out what which particular language a printer actually supports is daunting. I don't want to rewrite the Windows printing architecture if I can avoid it.) It looks, from http://www.codeguru.com/forum/showthread.php?t=151450, that I'm out of luck. Alan Bellingham -- Team Thai Kingdom <url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions <url:http://www.borland.com/newsgroups/netiquette.html> netiquette
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads