Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Delphi5: API-Problem bei Duplex-Druck

Empfohlene Antworten

Veröffentlicht

Hallo, ich habe folgendes Problem, ich steuere die Eigenschaften eines Druckauftrages per DocumentProperties. Das klappt eigentlich auch, mit einer Ausnahme. Die Option "dmDuplex" kann ich setzen wie ich will, es wird immer die Einstellung von Windows geholt. Hier der Code dazu:

function TPrnt.DeviceMode(paDeviceMode: TDeviceMode): Boolean;

var

sdevice, sdriver, sport: array[0..255] of char;

Device, Driver, Port: pchar;

hPrinter : THandle;

Dm : TDeviceMode;

pDm1 : PDeviceMode;

hDm1 : THandle;

Status : LongInt;

Size : LongInt;

begin

device := @sdevice;

driver := @sdriver;

port := @sport;

GetPrinter(Device, Driver, Port, Dm);

Result := OpenPrinter(Device, hPrinter, nil);

if (Result) then

begin

size := _DocumentProperties(0, hPrinter, Device, nil, nil, 0);

hDm1 := GlobalAlloc(GMEM_MOVEABLE or GMEM_ZEROINIT, size);

pDm1 := GlobalLock(hDm1);

_DocumentProperties

(

0,

hPrinter,

Device,

pDm1, pdm1,

DM_OUT_BUFFER

);

with pdm1^ do

begin

dmfields := padevicemode.dmfields;

if (dm_papersize and dmfields) <> 0 then

dmpapersize := padevicemode.dmpapersize;

if (dm_duplex and dmfields) <> 0 then

dmduplex := padevicemode.dmduplex;

end;

Status := _DocumentProperties

(

0,

hPrinter,

Device,

pDm1, pDm1,

DM_OUT_BUFFER or DM_IN_BUFFER

);

Result := (Status > 0);

GlobalUnlock(hDm1);

Printer.SetPrinter

(

Device,

Driver,

Port,

hDm1

);

end;

end; //__TPrnt_DeviceMode

Werde ich da vom Druckertreiber geärgert, oder mach ich was falsch ?

(Habs bislang auf einem Brother 1870N ausprobiert)

Werde morgen ein paar Tests mit anderen Treibern starten.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.