|
From: Solomon P. <pi...@sh...> - 2021-08-09 01:49:19
|
On Sun, Aug 08, 2021 at 07:03:33PM -0400, Robert Krawitz wrote:
> initialVerticalOffset and blackInitialVerticalOffset may be what you
> want (you'll need to set both in the model file). They're expressed
> in units of baseSeparation, which is 360; 1374 would be 343.5, so
> you'd have to use either 343 or 344 for this purpose. If that's not
> good enough -- if you really need it more precise -- we'll have to
> come up with something else.
Hmm, initialVerticalOffset seems to only be used as an input to ESC(c,
which I'd commented out. Re-enabling it and plugging both positive and
negative numbers in seems to have no effect on the printer behavior:
1b ( c 08 00 82 fa ff ff 5a 19 00 00
1b ( c 08 00 18 01 00 00 5a 19 00 00
So that's not going to work. However, I discovered what we really want
is pd->printing_initial_vertical_offset, but there is no way to set it
via XML and it is currently hardcoded to 0. Force-setting that to an
appropriate value works great, so I added the code to read it from the
model XML.
Since that value needs to be specified in terms of base_res * 2, which
varies based on the print resolution. it either needs to be specified in
resolution-independent units (and get converted) or has to be pushed
made into a <resolution> parameter. Which is your preference?
BTW, I don't get the results I want until I push the offset out slightly
over an inch. Chalk it all up to margin differences with the Windows
driver.
So, the hacks I still have in my code:
* Always bypass sending ESC(c and ESC(C
* Always send ESC(g based on paper height
* Disable the special case for 720x360 in adjusted_vertical_resolution()
I think the prudent thing to do is add some sort of model flag that says
a model is roll-only, and those first two things can key off of that?
I suspect we'll need something similar for print size
selection/filtering; this model is most commonly used to produce
standard photo sizes (eg 5x7, 6x8, 8x10) but thanks to the roll-only
media even under Windows it supports arbitrary print lengths.
- Solomon
--
Solomon Peachy pizza at shaftnet dot org (email&xmpp)
@pizza:shaftnet dot org (matrix)
High Springs, FL speachy (libra.chat)
|