Programming ESC/P (Epson FX800)

Anything QL Software or Programming Related.
User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Programming ESC/P (Epson FX800)

Post 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


User avatar
tofro
Font of All Knowledge
Posts: 3148
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Programming ESC/P (Epson FX800)

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Programming ESC/P (Epson FX800)

Post 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...)


User avatar
tofro
Font of All Knowledge
Posts: 3148
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Programming ESC/P (Epson FX800)

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Programming ESC/P (Epson FX800)

Post by Cristian »

tofro wrote:Once you have read the Epson manual,
Sure, I'm going to read it :)
Thanks!


User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Programming ESC/P (Epson FX800)

Post 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.....


RWAP
RWAP Master
Posts: 2893
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Programming ESC/P (Epson FX800)

Post 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


User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Programming ESC/P (Epson FX800)

Post 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


User avatar
tofro
Font of All Knowledge
Posts: 3148
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Programming ESC/P (Epson FX800)

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Programming ESC/P (Epson FX800)

Post 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 :)


Post Reply