need to change font size in printer

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
vivekvinodhraj
Posts: 2
Joined: 29 Jan 2013 12:10

need to change font size in printer

#1 Post by vivekvinodhraj » 29 Jan 2013 12:18

Hello guys,

I am trying to print my notepad content in Epson LX 800 dos matrix printer in different font size. I.e heading with big font and content with small font.

But i could not able to change the font in printer. Please help me to change the font size and print the notepad from dos command.

Looking forward for your help.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: need to change font size in printer

#2 Post by foxidrive » 29 Jan 2013 13:32

There are no native batch commands to control font and text size.

miskox
Posts: 668
Joined: 28 Jun 2010 03:46

Re: need to change font size in printer

#3 Post by miskox » 30 Jan 2013 00:22

I would think that this might be possible with escape sequences. Check your printer's manual for these codes. And you have to 'print' them before you print your .txt file.
Also I checked service/technical manual online and I see that there are DIP switches for some settings (for example typeface: normal/condensed). This rises a question if these setting can then be programmaticaly changed. Also Interntaional characher set is set with these DIP switches.

Saso

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: need to change font size in printer

#4 Post by foxidrive » 30 Jan 2013 00:48

Yes, you are right. Escape sequences will control many a dot matrix printer - sending the codes could probably be done in batch but I'd use VBS.

The OP might be looking for a full blown control panel for his printer rather than a single font and size.

vivekvinodhraj
Posts: 2
Joined: 29 Jan 2013 12:10

Re: need to change font size in printer

#5 Post by vivekvinodhraj » 30 Jan 2013 12:28

Hi Miskox,

You was telling "you have to 'print' them before you print your .txt file";

type "escape sequences" > prn
type textfile.txt >prn

will this help
or
we need to add escape sequence in top of the textfile

miskox
Posts: 668
Joined: 28 Jun 2010 03:46

Re: need to change font size in printer

#6 Post by miskox » 30 Jan 2013 15:21

I re-read your original post. You want different font sizes in your text.

I have a User's and Programmer's manual for FUJITSU DL3600* dot matrix printer here and it has these escape sequences for Double Height Characters on/off:

'ESC'V1 - Double Height Character ON (hex values: 1b 56 31)
'ESC'V0 - Double Height Character OFF (hex values: 1b 56 30)

Now let's say that the some_text_file.txt contains this:

Code: Select all

TITLE - something

Text body.


So, to print the TITLE - something line in double height you would have to add the above escape codes before this line:

Code: Select all

'ESC'V1TITLE - something'ESC'V0

Text body.


'ESC' is a decimal value of 27 (hex 1b) and not just a text 'ESC'.

This would tell the printer to print everything that is after the 'ESC'V1 code in double height until it receives the OFF command.

You can do this by adding these codes into the main .txt file or you can have separate files:

Double_height_ON.txt

Code: Select all

'ESC'V1


Double_height_OFF.txt

Code: Select all

'ESC'V0


but you would have to split the main file in two parts:

title.txt

Code: Select all

TITLE - something


body.txt

Code: Select all


Text body.



and then you would print the files:

Code: Select all

print Double_height_ON.txt+title.txt+Double_height_OFF.txt+body.txt


I am sure it would work if you print each file seperately (because printer would not change the settings between the files).

Code: Select all

print Double_height_ON.txt
print title.txt
print Double_height_OFF.txt
print body.txt


It is always good to set the printer settings back to the original state. For example: if you print your entire file in Condensed mode and you don't turn Condensed mode OFF somebody after you would get his/her file printed in the condensed mode because printer would have this setting still ON - not good.

Hope this helps.
Saso

* I don't know if these escape sequences would work with your LX 800 printer.

Post Reply