-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESC Epson printer language support #470
Comments
Hi, I am the author of the virtual printer in Ultimate devices and I will process your query. You can take a look at the virtual printer documentation. All implemented ESC codes are documented for each instruction set. https://github.com/GideonZ/1541ultimate/blob/master/doc/ultimate_printer.pdf
|
Thank you for your prompt reply; indeed, documentation can be lax by omission on certain points. For ESC D, the docs seem uniform. Parsing stops when a value smaller than the previous one is encountered, but the null character is still required. |
Hello, I'm currently studying your code for emulating the Epson ESC/P
to compare it with my own project (https://github.com/ysard/escapy).
PS: I find your way of implementing dot intensity in Draft / NLQ mode very elegant ;)
I've found 3 things that sound curious about ESC commands
(I suppose we're both using the Epson ESC/P Reference Manual from December 1997 (?)).
ESC D for tabs definition is supposed to end with a NULL byte, not 0x01.
It's a variable-size command with up to 32 possible values; the last character is an end marker.
Concerned line:
1541ultimate/doc/printer/epsontest.c
Line 179 in 4b53624
ESC R and ESC I:
The epson doc specifies that the accepted parameters are 0 or 1, not 0, 1, 48, 49 (decimal values of “0” and “1”).
Here I'm uncertain whether 48 and 49 should be supported but when it is the case for other commands,
the documentation is precise on this subject (e.g. ESC t).
However, you're using the values of “0” and “1” here:
1541ultimate/doc/printer/epsontest.c
Line 199 in 4b53624
1541ultimate/doc/printer/epsontest.c
Lines 25 to 26 in 4b53624
You don't exit from the condensed mode explicitly prior to the PICA/ESC P commands, which set the character pitch to 1/10.
Exiting condensed mode would actually have resulted in a return to 1/10 pitch.
In my program, this is equivalent to remaining in condensed mode but with character pitch at 1/10
(for me, condensed mode is a boolean independent of character pitch), the render is obviously wrong on my side.
How do you think the programs of the time behaved on this point (explicit exit or not?)?
1541ultimate/doc/printer/epsontest.c
Lines 168 to 172 in 4b53624
Unfortunately I don't have access to a real machine to test these hypotheses...
Did you test the rendering of your test code on a real printer?
Thanks for reading.
The text was updated successfully, but these errors were encountered: