DevPaperBin

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

DevPaperBin

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by PHP and the Community Edition]

Selects a paper bin for the currently selected output device.

property PaperBin [long] VPE.DevPaperBin

read / write; runtime only

Possible Values:

ActiveX / VCL

Value

Enum

Comment

VBIN_UPPER

1

Upper

 

VBIN_ONLYONE

1

OnlyOne

 

VBIN_LOWER

2

Lower

 

VBIN_MIDDLE

3

Middle

 

VBIN_MANUAL

4

Manual

 

VBIN_ENVELOPE

5

Envelope

 

VBIN_ENVMANUAL

6

EnvelopeManual

 

VBIN_AUTO

7

Auto

 

VBIN_TRACTOR

8

Tractor

 

VBIN_SMALLFMT

9

SmallFormat

 

VBIN_LARGEFMT

10

LargeFormat

 

VBIN_LARGECAPACITY

11

LargeCapacity

 

VBIN_CASSETTE

14

Cassette

 

 

Additionally, each printer driver may define its own constants for other bins (see Remarks).

 

Not all of the bin options are available on every printer. Check the printer documentation for more specific descriptions of these options.

Remarks:

In case of an error, LastError is set to VERR_COMMON. An error may occur if the device does not support multiple paper bins.

 

The Bin-ID’s are numeric Windows system constants to identify a bin. Additionally each printer driver may define its own constants for other bins. To retrieve a Bin-ID defined by a printer driver, enumerate all bins with DevEnumPaperBins() and retrieve each Bin-ID associated with a Bin-Entry with GetDevPaperBinID().

 

The DevPaperBin property is available for total control. It is only useful if called while processing the BeforePrintNewPage() event (VCL: OnPrintNewPage(), .NET: BeforePrintNewPage()). Otherwise the DevPaperBin property is always overridden by the PaperBin property, which is specified separately for each page. You should always use the PaperBin property to change the bin for the printer.

 

It has been reported that several printer drivers - even from respectable manufacturers - do not behave correctly. Our own tests revealed for example that the HP 2200 D driver can only switch once the bin, but thereafter it will not switch the bin again. The HP 5P driver behaves correctly unless multiple copies and collation are selected. If collation is activated, the driver will print all pages except the first multiple times as if non-collation was selected.

Example:

long count, i

string s

count = Doc.DevEnumPaperBins() - 1        // initialize enumeration

for i = 0 to count

 // retrieve the name of the i-th paper bin

 s = Doc.GetDevPaperBinName(i)

 

 // show each available paper bin name in a separate message box

 MessageBox(s)

 

 // select the bin

 Doc.DevPaperBin = Doc.GetDevPaperBinID(i)

next i

 

or, to select a bin directly:

ActiveX / VCL

Doc.DevPaperBin = VBIN_LOWER

 

.NET

Doc.DevPaperBin = PaperBin.Lower