diff --git a/src/job.cc b/src/job.cc index 9212e65..833c557 100644 --- a/src/job.cc +++ b/src/job.cc @@ -80,6 +80,10 @@ void job::write_page_header() { if (page_params_.duplex) { fputs("\033&l2S", out_); + } else if (page_params_.tumble) { + fputs("\033&l1S", out_); + } else { + fputs("\033&l0S", out_); } } diff --git a/src/job.h b/src/job.h index bd7a83b..0c0442c 100644 --- a/src/job.h +++ b/src/job.h @@ -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 diff --git a/src/main.cc b/src/main.cc index d6232b4..abe0528 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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]; diff --git a/test/tempfile.h b/test/tempfile.h index 75feb6c..6441e9a 100644 --- a/test/tempfile.h +++ b/test/tempfile.h @@ -21,6 +21,7 @@ #include #include #include +#include #include class tempfile {