diff --git a/brlaser.drv.in b/brlaser.drv.in index 9f83b8e..09c65cf 100644 --- a/brlaser.drv.in +++ b/brlaser.drv.in @@ -94,4 +94,5 @@ Option "brlaserEconomode/Toner save mode" Boolean AnySetup 10 Attribute "NickName" "" "Brother DCP-7065DN, using @PACKAGE@ v@VERSION@" Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:DCP-7065DN;CLS:PRINTER;CID:Brother Laser Type1;" PCFileName "br7065dn.ppd" + Duplex rotated } diff --git a/src/job.cc b/src/job.cc index f5863cd..206bb11 100644 --- a/src/job.cc +++ b/src/job.cc @@ -76,6 +76,10 @@ void job::write_page_header() { fputs("\033E", out_); fprintf(out_, "\033&l%dX", std::max(1, page_params_.num_copies)); + + if (page_params_.duplex) { + fputs("\033&l2S", out_); + } } void job::encode_page(const page_params &page_params, diff --git a/src/job.h b/src/job.h index 69047a9..f26a78c 100644 --- a/src/job.h +++ b/src/job.h @@ -25,6 +25,7 @@ struct page_params { int num_copies; int resolution; + bool duplex; bool economode; std::string sourcetray; std::string mediatype; @@ -33,6 +34,7 @@ struct page_params { bool operator==(const page_params &o) const { return num_copies == o.num_copies && resolution == o.resolution + && duplex == o.duplex && economode == o.economode && sourcetray == o.sourcetray && mediatype == o.mediatype diff --git a/src/main.cc b/src/main.cc index 284d328..db238eb 100644 --- a/src/main.cc +++ b/src/main.cc @@ -111,6 +111,7 @@ page_params build_page_params() { p.resolution = header.HWResolution[0]; p.economode = header.cupsInteger[10]; p.mediatype = header.MediaType; + p.duplex = header.Duplex; if (header.MediaPosition < sources.size()) p.sourcetray = sources[header.MediaPosition];