Page 1 of 2

Programming ESC/P (Epson FX800)

Posted: Thu Mar 05, 2015 11:09 am
by Cristian
Could anyone let me know if it's possible to send ESC/P (Epson) codes from Superbasic to select the several printer characters? Can you give me some examples to change the fonts please?

Thanks

Re: Programming ESC/P (Epson FX800)

Posted: Thu Mar 05, 2015 12:18 pm
by tofro
Sure is.

Without TK2, you should be doing something like:

Code: Select all

10 OPEN #3,ser1
20 PRINT #3;CHR$(15); : REMark switch printer to condensed
30 CLOSE #3
or

Code: Select all

10 OPEN #3,ser1
20 PRINT#3;CHR$(27);'k';CHR$(4); : REMark switch to "Script" typeface
30 PRINT#3;"Hello World"
40 CLOSE #3
In case you have Toolkit 2 at hand, you can replace the PRINT statements with BPUT, those are guaranteed to go untranslated (PRINT might be affected by TRA).

An ESC/P2 manual can be found at the Epson sites.
https://files.support.epson.com/pdf/gen ... cp2ref.pdf

Tobias

Re: Programming ESC/P (Epson FX800)

Posted: Thu Mar 05, 2015 12:52 pm
by Cristian
Thank you very much for both examples and manual :)
Yes, I have TK2, but actually I need to change the font (times, arial etc.), not the style/typeface (bold, italic...)

Re: Programming ESC/P (Epson FX800)

Posted: Thu Mar 05, 2015 1:06 pm
by tofro
Once you have read the Epson manual, you will have come to the conclusion that font and typeface is nearly the same in Epson terminology (look at ESC k, they're saying it changes the typeface, but it's actually changing the font, like Roman, Sans, Script....) ;)

ESC/P has had a long development history and thus not always logical terminology and even sorting.

Tobias

Re: Programming ESC/P (Epson FX800)

Posted: Thu Mar 05, 2015 1:19 pm
by Cristian
tofro wrote:Once you have read the Epson manual,
Sure, I'm going to read it :)
Thanks!

Re: Programming ESC/P (Epson FX800)

Posted: Wed Mar 11, 2015 10:05 am
by Cristian
:? there is the possibility that my printer can't accept some commands (e.g. font changes) via ESC-P, but only via PC software... I tried also the Printermaster software: some commands are accepted (double height, bold, underline, superscript...), some other no.
The investigation continues.....

Re: Programming ESC/P (Epson FX800)

Posted: Wed Mar 11, 2015 8:21 pm
by RWAP
Yes I am afraid so - it depends on whether the printer uses ESC/P or ESC/P2 and even then it can be just a subset - I recently had a Stylus Colour 300 printer which supports ESC/P2, BUT not lower case characters - now that is a really weird restriction - I was scratching my head for a while as to why a test string of

"Hello World today is 2015-03-11 "

Came out as
H W 2015-03-11

I have a full ESC/P2 programming manual and believe it is available online - it has a list of what commands are supported on which printers from memory - but ends at the Stylus Colour 200...

:D

Re: Programming ESC/P (Epson FX800)

Posted: Fri Mar 13, 2015 6:11 pm
by Cristian
RWAP wrote: "Hello World today is 2015-03-11 "

Came out as
H W 2015-03-11
Absolutely weird! :shock:
RWAP wrote: I have a full ESC/P2 programming manual and believe it is available online - it has a list of what commands are supported on which printers from memory - but ends at the Stylus Colour 200...
Thank you! Very interesting information. Does anybody know where?
In any case it's not an actual problem for me, since I can change the fonts via PC

Re: Programming ESC/P (Epson FX800)

Posted: Fri Mar 13, 2015 7:11 pm
by tofro
Cristian wrote: Does anybody know where?
Hmmm. Bad move. :)

Do what you're told: READ :D
See manual linked above "Command Table" - T2-22. All supported commands check marked per printer.

Tobias

Re: Programming ESC/P (Epson FX800)

Posted: Sat Mar 14, 2015 9:26 pm
by Cristian
tofro wrote:
Cristian wrote: Does anybody know where?
Hmmm. Bad move. :)

Do what you're told: READ :D
See manual linked above "Command Table" - T2-22. All supported commands check marked per printer.

Tobias
Wow, are you always so serious Tobias? :mrgreen: I thought RWAP was referring to another manual... sorry for my poor English knowledge.
Yes, I did read the manual (a wonderful manual, thanks!) but I'm afraid my printer is too new.
In any case, thank you again for your prompt replies :)