Connecting Tech Pros Worldwide Forums | Help | Site Map

Increase Ms Dos Print font size

Newbie
 
Join Date: Sep 2006
Posts: 2
#1: Sep 9 '06
hallo,

I am using vb 6.0. How to increase the Font size of Dos print rather than normal?
could help any one.

ragesh

PEB's Avatar
PEB PEB is offline
Expert
 
Join Date: Aug 2006
Location: Bulgaria
Posts: 1,380
#2: Sep 9 '06

re: Increase Ms Dos Print font size


Quote:

Originally Posted by ragesh

hallo,

I am using vb 6.0. How to increase the Font size of Dos print rather than normal?
could help any one.

ragesh

It depends on your printer!
In the past I've used a dot matrix printers and there was a set of commands /Escape commands used in basic to change the fonts and their size... There was a big set of tools comming to me with the printer documentation!

But I suppose that only matrix printers can print under MS Dos The others have some difficulties espacially for the specials symbols like cyrillic and geek

So what is your printer? Do you have documentation in your printer about printing under dos?

Best regards
Newbie
 
Join Date: Sep 2006
Location: Hawaii
Posts: 7
#3: Sep 17 '06

re: Increase Ms Dos Print font size


Quote:

Originally Posted by ragesh

hallo,

I am using vb 6.0. How to increase the Font size of Dos print rather than normal?
could help any one.

ragesh

PEB is right! It will depend upon your printer. For instance SOME of the escape commands under HP's PCL language are listed below:
Escape Sequences
Code Dec Hex Function
--------------------------------------------------------------------------
ESC SO 27 14 1B 0E Set double width print
ESC SI 27 15 1B 0F Set condensed width print
ESC SP n 27 32 n 1B 20 n Adjust space between characters
ESC ! n 27 33 n 1B 21 n Select other print modes
ESC + n 27 43 n 1B 2B n Set n/360 of inches as spacing
ESC 0 27 48 1B 30 Select the 1/8 of inches spacing
ESC 2 27 50 1B 32 Select the 1/6 of inches spacing
ESC 3 n 27 51 n 1B 33 n Select n/180 of inches as line spacing
ESC 4 27 52 1B 34 Select the Italic mode
ESC 5 27 53 1B 35 Deselect the Italic mode
ESC A n 27 65 n 1B 41 n Set n/60 of inches as line spacing
ESC B n n 27 66 n n 1B 42 n n Set the vertical tab
ESC E 27 69 1B 45 Select the bold print mode
ESC F 27 70 1B 46 Deselect the bold print mode
ESC G 27 71 1B 47 Select the double strike mode
ESC H 27 72 1B 48 Deselect the double strike mode
ESC M 27 77 1B 4D Set the 12 char per inches mode
ESC P 27 80 1B 50 Set 10 charachter per inch
ESC W n 27 87 n 1B 57 n Select/Deselect the double width print mode
ESC p n 27 112 n 1B 70 n Set or Reset the proportional spacing printing mode
ESC q n 27 113 n 1B 71 n Select the character style
ESC t n 27 116 n 1B 74 n Select the character font
ESC w n 27 119 n 1B 77 n Select/Deselect the double height mode
ESC x n 27 120 n 1B 78 n Select/Deselect the high letter quality mode

...these are just some of the options that might be related to your needs.
Newbie
 
Join Date: Jan 2007
Posts: 2
#4: Jan 16 '07

re: Increase Ms Dos Print font size


Quote:

Originally Posted by CRSI

PEB is right! It will depend upon your printer. For instance SOME of the escape commands under HP's PCL language are listed below:
Escape Sequences
Code Dec Hex Function
--------------------------------------------------------------------------
ESC SO 27 14 1B 0E Set double width print
ESC SI 27 15 1B 0F Set condensed width print

My modern Canon printer ignores all these escape commands! Can anyone help me and suggest solution?
Newbie
 
Join Date: Jan 2007
Posts: 2
#5: Apr 7 '07

re: Increase Ms Dos Print font size


Quote:

Originally Posted by leplear

My modern Canon printer ignores all these escape commands! Can anyone help me and suggest solution?

So I answer my questions by myself.

I tested many utilities and drivers and at least I found a nice tools DOS PRINT. It prints my documents with escape commands properly.
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#6: Apr 8 '07

re: Increase Ms Dos Print font size


Quote:

Originally Posted by leplear

So I answer my questions by myself.
...

Thanks for sharing that with us. This will help anyone else who comes searching for the same sort of info.

ragesh, does this resolve your problem?
Newbie
 
Join Date: Sep 2007
Posts: 1
#7: Sep 28 '07

re: Increase Ms Dos Print font size


Quote:

Originally Posted by ragesh

hallo,

I am using vb 6.0. How to increase the Font size of Dos print rather than normal?
could help any one.

ragesh

Can You tell me how do u print in
DOS mode from VB?
Newbie
 
Join Date: Dec 2007
Posts: 2
#8: Dec 8 '07

re: Increase Ms Dos Print font size


Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdPrint_Click()
  2. 'This is the sample how to print in Dos Mode and How to print it Bold!
  3.  
  4.     Open "Lpt1" For Output As #1
  5.  
  6.        Print #1, Chr(27) & "@" 'Initialize printer
  7.        Print #1, Chr(27) & "A" & Chr(11)
  8.        Print #1, Chr(27) & "E" 'Set Font Bold
  9.        Print #1, "Printer is Bold"
  10.        Print #1, "Printer is Bold"
  11.        Print #1, Chr(27) & "F" ' Set Font Normal
  12.  
  13.        Print #1, "Printer is Normal"
  14.        Print #1, "Printer is Normal"
  15.  
  16.    Close #1
  17. End Sub
Newbie
 
Join Date: Jul 2008
Posts: 2
#9: Jul 7 '08

re: Increase Ms Dos Print font size


I have an old VB program, matrix printer STAR NX-1500 and I want to print text with different font size. I tried 'bold', 'double strike' and other control commands but they are very trivial.

Can anybody suggest as I can print strings with different height and width? Word and Excel print my documents without problems with any fonts.
Newbie
 
Join Date: Jul 2008
Posts: 2
#10: Jul 16 '08

re: Increase Ms Dos Print font size


I found solution for my problem by myself. For printing text with different font size I was recommended to use Hewlett Packard PCL command language. Unfortunately my STAR NX-1500 is not PCL-compatible and I cannot use PCL sequences directly.

But since I could print formatted text from the Windows Word I suspected there is a way for printing from my VB program too. And I'm right!

There are special programs which emulate PCL language and convert data with PCL sequences into images. Moreover, I found certain utility which was designed for printing support specially. This third-party program allows to print text documents on any kind of printer.

Now I can print reports with PCL commands on my STAR NX printer but the same program could print documents with Epson control commands into any modern inkjet, laserjet printers, even into PDF- and FAX-printers.

This wonderful utility has name "DOSPRN". If somebody take an interest you can learn more about this tool at http://www.dosprn.com
Reply


Similar Visual Basic 4 / 5 / 6 bytes