🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3163

Changing printer copy count mid-print

#3163
From: Alan Bellingham
Date: Thu, 31 Aug 2006 14:46
27 lines
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
Technical Details
Message-ID: <evsdf2pb0nq201l7s7qj4rrg5fch5733bo@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!feeder02.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ee9872517ed79963,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Alan Bellingham <alan@lspace.org>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Changing printer copy count mid-print
Date: Thu, 31 Aug 2006 15:46:25 +0100
Organization: Private
Reply-To: alan@lspace.org
Message-ID: <evsdf2pb0nq201l7s7qj4rrg5fch5733bo@4ax.com>
X-Newsreader: Forte Agent 4.0/32.1071
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.129.251.253
X-Trace: newsgroups.borland.com 1157035585 193.129.251.253 (31 Aug 2006 07:46:25 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!feeder02.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail