I am printing no of lines in DOS(CMD Prompt In Windows 7) using Batch file into DOT MATRIX Printer. Its A5 Paper. The problem is I cant able to add more than 53 characters per line for A5 print. How to increase the characters per line for this A5 size.
This printer (TVS MSP 250 Star) supports ESC/P (this is an Epson standard) and IBM Proprinter emulation. This means you can send a small file before your actual file which switches the printer to condensed mode.
For the ESC/P emulation you can do the following:
This is not a literal file. The file should be just 2 character (#27 and #15). You'll need an editor who can create an "Escape" (#27) and "Condensed" (#15) character (e.g. Hex-editor). If you don't have one see below how to make the file.
Next you can print your file like this:
If you don't have a Hex-editor you can do the following:
Make a textfile with the following (call it
Then execute the following on a command prompt:
This will result in a
Edit: It is recommended to try
From the ESC/P manual: and
To summarize (excluding the borders/margins, so it could be less with margins):
So the smallest would be
If you don't need the file to be opened in a normal editor you can include these codes in your file. You can then also add goodies like bold, italic etc. To set a word in bold you could do the following:
You could also use the "Double font width/height":
You see that you can combine all of these codes to do anything. There is also a "Master Select" (page 125 of the manual). If you switch a lot between fonts you can use that to switch cpi, bold, condensed, italic etc in one command. (
First, you need to find the printer language the printer is using. Then, look up and send the condensed print command before the job. Many dot matrix type devices used an escape code sequence so you'd send the esc character sometimes seen as 027 hex and then a sequence of characters. This sequence tells the printer to change fonts, line spacing, font size... Note that it is particular to the printer. There wasn't a truly universal language.