From: Solomon P. <pi...@sh...> - 2021-08-10 23:48:35
|
Here are the non-XML changes sitting in my tree. The changes in stpi_escp2_init_printer() need to be gated off some sort of feature flag, perhaps <rollOnly/> in the model.xml file that defines a MODEL_ROLL_ONLY capability bit? Not sure what approach I should take here. The other change disables the special-case in 720x360 resolution so the ESC(U command matches what the windows driver sends the printer, but there doesn't seem to be any adverse effects to leaving it unchanged. diff --git a/src/main/escp2-driver.c b/src/main/escp2-driver.c index 13c39e73..011a43e1 100644 --- a/src/main/escp2-driver.c +++ b/src/main/escp2-driver.c @@ -405,6 +405,16 @@ escp2_set_dot_size(stp_vars_t *v) stp_send_command(v, "\033(e", "bcc", 0, pd->drop_size); } +static void +escp2_set_cutter(stp_vars_t *v) +{ + escp2_privdata_t *pd = get_privdata(v); + int l = pd->page_true_height * 2880 / 72; + /* always 2880, independent of configured resolutions */ + + stp_send_command(v, "\033(g", "bl", l); +} + static void escp2_set_page_height(stp_vars_t *v) { @@ -623,9 +633,12 @@ stpi_escp2_init_printer(stp_vars_t *v) escp2_set_printer_weave(v); escp2_set_printhead_speed(v); escp2_set_dot_size(v); + escp2_set_cutter(v); escp2_set_printhead_resolution(v); +#if 0 escp2_set_page_height(v); escp2_set_margins(v); +#endif escp2_set_paper_dimensions(v); } diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c index a1814eac..24463843 100644 --- a/src/main/print-escp2.c +++ b/src/main/print-escp2.c @@ -3889,8 +3889,10 @@ adjusted_vertical_resolution(const stp_vars_t *v, const res_t *res) { if (res->vres >= escp2_base_separation(v) * 2) return res->vres; +#if 0 // XXX this causes ESC(U to differ from the Windows driver else if (res->hres >= escp2_base_separation(v) * 2) /* Special case 720x360 */ return escp2_base_separation(v) * 2; +#endif else if (res->vres % 90 == 0) return res->vres; else - Solomon -- Solomon Peachy pizza at shaftnet dot org (email&xmpp) @pizza:shaftnet dot org (matrix) High Springs, FL speachy (libra.chat) |