pdewacht / brlaser

Brother laser printer driver
GNU General Public License v2.0
602 stars 114 forks source link

Updated Code; Duplex, Simplex #180

Open QORTEC opened 1 year ago

QORTEC commented 1 year ago

Duplex, Simplex

The following code explicitly sets the duplex/simplex in PCL.

if (page_params_.duplex && page_params_.tumble) {
  fputs("\033&l2S", out_);
} else if (page_params_.duplex) {
  fputs("\033&l1S", out_);
} else {
  fputs("\033&l0S", out_);
}

\033&l2S: This sets the printer to duplex printing with tumble mode. \033&l1S: This sets the printer to duplex printing without tumble mode. \033&l0S: This sets the printer to simplex (single-sided) printing.

169 explicitly sets the printer in simplex mode (\033&l0S).

This resolves the issue of printers continuing to duplex when disabled.

QORTEC/brlaser#2 adds duplex no tumble printing (\033&l1S). This change also adds logic to print with and without tumble.

Compiling

QORTEC/brlaser#3 fixes building on Fedora 38; error: 'uint8_t' was not declared in this scope Resolves , so uint8_t undeclared issue by explicitly including cstdint in test/tempfile.h.

knkrth commented 3 weeks ago

How to copy 2 side -> 2 side layout. On the official firmware there is only 1 side -> 2 side layout option available.