mirror of
https://github.com/pdewacht/brlaser
synced 2025-04-20 01:56:45 +02:00
Tumble support
This commit is contained in:
parent
d209bac4c1
commit
b93c4adf0c
@ -78,8 +78,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) {
|
||||
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_);
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ struct page_params {
|
||||
int num_copies;
|
||||
int resolution;
|
||||
bool duplex;
|
||||
bool tumble;
|
||||
bool economode;
|
||||
std::string sourcetray;
|
||||
std::string mediatype;
|
||||
@ -36,6 +37,7 @@ struct page_params {
|
||||
return num_copies == o.num_copies
|
||||
&& resolution == o.resolution
|
||||
&& duplex == o.duplex
|
||||
&& tumble == o.tumble
|
||||
&& economode == o.economode
|
||||
&& sourcetray == o.sourcetray
|
||||
&& mediatype == o.mediatype
|
||||
|
@ -111,6 +111,7 @@ page_params build_page_params(const cups_page_header2_t &header) {
|
||||
p.economode = header.cupsInteger[10];
|
||||
p.mediatype = header.MediaType;
|
||||
p.duplex = header.Duplex;
|
||||
p.tumble = header.Tumble;
|
||||
|
||||
if (header.MediaPosition < sources.size())
|
||||
p.sourcetray = sources[header.MediaPosition];
|
||||
|
Loading…
x
Reference in New Issue
Block a user