Hi all!
I need to switch paperbins when printing copies.
The logic is as follows: The first copy shall go to
bin 1, all following copies shall go to bin 2.
I tried to implement this in tdcprv3:PrintSeg
in the for k=1 to ::numCopies-loop. But the
printer does not react at all to my setPaperBin (nBin)
statement, it simply prints to standard bin.
Any hints appreciated!
Greetings
Heinz
Printing, switching paperbins
Re: Printing, switching paperbins
Before calling :setPaperBin() you must first call :endPage(), then after calling :setPaperBin() to must call :startPage().
The eXpress train is coming - and it has more cars.
Re: Printing, switching paperbins
Heinz,
tdcprv3 is a TopDown command, best to ask Clayton directly.
tdcprv3 is a TopDown command, best to ask Clayton directly.
Re: Printing, switching paperbins
#Define in c:\ALASKA\XPPW32\Include\xbpdev.ch must not "match" your Printer.HRoesch01 wrote:o:setPaperBin (nBin)
use o:paperBins() to find out if #Define "match" your Printer
this it a HP 2055dn Printer with 2nd Paper Tray
greetings by OHR
Jimmy
Jimmy
Re: Printing, switching paperbins
Hi Roger!
Since the exact sequence of print methods is of critical importance,
i would like to present the final solution. Just in case someone has
a client, that needs this special type of printing.
Greetings
Heinz
Yeah, that did the trick! Thank you for fast and excellent support, as usual!rdonnay wrote:Before calling :setPaperBin() you must first call :endPage(), then after calling :setPaperBin() to must call :startPage().
Since the exact sequence of print methods is of critical importance,
i would like to present the final solution. Just in case someone has
a client, that needs this special type of printing.
Greetings
Heinz
Code: Select all
IF lPrint
nCopies := ::nNumCopies
::tdcprn3:SetNumCopies (1)
******* Give PS to printer object
::oPS:mode := XBPPS_MODE_NORMAL
::oPs:configure(self)
::oPs:setfont(::oFont)
FOR k := 1 TO nCopies
if k == 1
// erste Kopie auf Schacht 1
nBin := GetPaperBin (::tdcPrn3:DevName, 1)
if TestMode ()
alert ("Schacht 1: " + str (nBin))
endif
if ! empty (nBin)
::tdcPrn3:endPage ()
::tdcPrn3:SetPaperBin (nBin)
::tdcPrn3:startPage ()
endif
else
// folgende Kopien auf Schacht 2
nBin := GetPaperBin (::tdcPrn3:DevName, 2)
if TestMode ()
alert ("Schacht 2: " + str (nBin))
endif
if ! empty (nBin)
::tdcPrn3:endPage ()
::tdcPrn3:SetPaperBin (nBin)
::tdcPrn3:startPage ()
endif
endif
******* begin output
::tdcPrn3:startdoc(cJob)
IF cMode == 'all'
nLen := len(::aSegments)
FOR i := 1 TO nLen
GraSegDraw(::oPs,::aSegments[i])
IF i < nLen
::tdcPrn3:newpage()
ENDIF
NEXT
ELSEIF cMode == 'curr'
******* print current segment
GraSegDraw(::oPs,::nSeg)
ELSEIF cMode == 'range'
FOR i := nP1 TO nP2
GraSegDraw(::oPs,::aSegments[i])
IF i < nP2
::tdcPrn3:newpage()
ENDIF
NEXT
ENDIF
******* end output
::tdcPrn3:endDoc()
NEXT
******* Take back PS from printer object
::oPS:mode := XBPPS_MODE_HIGH_PRECISION
::oPS:configure(::oPage:windevice())
::oPS:setfont(::oFont)
******* reset PS color attribute
::oPS:SetAttrArea(::aAreaAttr)
******* resize vp
::calcVP(@vnX,@vnY,@vnX2,@vnY2)
::oPs:setViewPort({vnX,vnY,vnX2,vnY2})
::lPrinted := .T.
ENDIF // lPrint
Re: Printing, switching paperbins
Hi Jimmy!
Since we do not need that very often i have a support
function in our software that alerts the paperBins()-data
for any choosable printer.
The supporter than feeds back the chosen bins by use
of simple system variables. Not too elegant, but it works!
Greetings
Heinz
Yes, i know. Windows chaos, as usual!Auge_Ohr wrote:#Define in c:\ALASKA\XPPW32\Include\xbpdev.ch must not "match" your Printer.
Since we do not need that very often i have a support
function in our software that alerts the paperBins()-data
for any choosable printer.
The supporter than feeds back the chosen bins by use
of simple system variables. Not too elegant, but it works!
Greetings
Heinz