Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HP 4250: Devicecapabilities() reports too many bins

0 views
Skip to first unread message

Gonzo

unread,
May 3, 2005, 12:56:45 PM5/3/05
to
Hello,

My application doesn't work correctly with HP4250 PCL-6 drivers. The problem
is caused by an incorrect number of bins reported by the WinAPI
DeviceCapabilities(). It turned out that source (i.e. the bin - like tray1,
tray2, automatically select etc.) and type (e.g. letterhead, labels, rough
etc.) cannot be seperated DeviceCapabilities(). Here's part of the source:

<BEGIN SNIPPET>

Printer.GetPrinter(Device, Driver, Port, hDevmode);
numBinNames := WinSpool.DeviceCapabilities( Device, Port, DC_BINNAMES,
Nil, Nil );
numBins := WinSpool.DeviceCapabilities( Device, Port, DC_BINS, Nil, Nil );
if numBins <> numBinNames then begin
raise Exception.Create('DeviceCapabilities reports different number of
bins and bin names!');
end;
PopupMenuPrinterBak.Items.Clear;
ItemIndexBakFound := false;

BakIniFile := fInifileMain.ReadString('PrinterInstellingen', 'Bak',
DEFAULT_PRINTER_STRING);
if numBinNames > 0 then begin
GetMem( pBinNames, numBinNames * Sizeof( TBinname ));
GetMem( pBins, numBins * Sizeof(Word));
try
WinSpool.DeviceCapabilities( Device, Port, DC_BINNAMES, Pchar(
pBinNames ), Nil);
WinSpool.DeviceCapabilities( Device, Port, DC_BINS, Pchar( pBins ),
Nil );
for ii := 1 to numBinNames do begin
..
..

< END SNIPPET>

The printer driver itself (accessible through control
panel->printer->properties) is able to separate type and source.

This problem doesn't occur with other HP-drivers tested up to now (like
Laster jet 5, -4000, -4100, -4050).

Any idea how to fix this?

Thanks a lot.


0 new messages