mirror of
https://github.com/pdewacht/brlaser
synced 2024-12-27 07:48:21 +01:00
Add duplex code for DCP-7065DN
The official Brother driver treats Tumble and NoTumble differently, adding &l2S and &l1S respectively to the header. Unfortunately, for me this resulted in missing lines in NoTumble. By treating everything as Tumble and simply sending data rotated 180 for Tumble we get a good quality printout.
This commit is contained in:
parent
5c5118edc1
commit
7e59e6147e
@ -94,4 +94,5 @@ Option "brlaserEconomode/Toner save mode" Boolean AnySetup 10
|
|||||||
Attribute "NickName" "" "Brother DCP-7065DN, using @PACKAGE@ v@VERSION@"
|
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;"
|
Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:DCP-7065DN;CLS:PRINTER;CID:Brother Laser Type1;"
|
||||||
PCFileName "br7065dn.ppd"
|
PCFileName "br7065dn.ppd"
|
||||||
|
Duplex rotated
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,10 @@ void job::write_page_header() {
|
|||||||
|
|
||||||
fputs("\033E", out_);
|
fputs("\033E", out_);
|
||||||
fprintf(out_, "\033&l%dX", std::max(1, page_params_.num_copies));
|
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,
|
void job::encode_page(const page_params &page_params,
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
struct page_params {
|
struct page_params {
|
||||||
int num_copies;
|
int num_copies;
|
||||||
int resolution;
|
int resolution;
|
||||||
|
bool duplex;
|
||||||
bool economode;
|
bool economode;
|
||||||
std::string sourcetray;
|
std::string sourcetray;
|
||||||
std::string mediatype;
|
std::string mediatype;
|
||||||
@ -33,6 +34,7 @@ struct page_params {
|
|||||||
bool operator==(const page_params &o) const {
|
bool operator==(const page_params &o) const {
|
||||||
return num_copies == o.num_copies
|
return num_copies == o.num_copies
|
||||||
&& resolution == o.resolution
|
&& resolution == o.resolution
|
||||||
|
&& duplex == o.duplex
|
||||||
&& economode == o.economode
|
&& economode == o.economode
|
||||||
&& sourcetray == o.sourcetray
|
&& sourcetray == o.sourcetray
|
||||||
&& mediatype == o.mediatype
|
&& mediatype == o.mediatype
|
||||||
|
@ -111,6 +111,7 @@ page_params build_page_params() {
|
|||||||
p.resolution = header.HWResolution[0];
|
p.resolution = header.HWResolution[0];
|
||||||
p.economode = header.cupsInteger[10];
|
p.economode = header.cupsInteger[10];
|
||||||
p.mediatype = header.MediaType;
|
p.mediatype = header.MediaType;
|
||||||
|
p.duplex = header.Duplex;
|
||||||
|
|
||||||
if (header.MediaPosition < sources.size())
|
if (header.MediaPosition < sources.size())
|
||||||
p.sourcetray = sources[header.MediaPosition];
|
p.sourcetray = sources[header.MediaPosition];
|
||||||
|
Loading…
Reference in New Issue
Block a user