Increase Ms Dos Print font size

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ragesh
    New Member
    • Sep 2006
    • 2

    Increase Ms Dos Print font size

    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
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    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

    Comment

    • CRSI
      New Member
      • Sep 2006
      • 6

      #3
      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.

      Comment

      • leplear
        New Member
        • Jan 2007
        • 2

        #4
        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?

        Comment

        • leplear
          New Member
          • Jan 2007
          • 2

          #5
          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.

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #6
            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?

            Comment

            • kjeet
              New Member
              • Sep 2007
              • 1

              #7
              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?

              Comment

              • shanavaspi
                New Member
                • Dec 2007
                • 2

                #8
                [CODE=vb]Private Sub cmdPrint_Click( )
                'This is the sample how to print in Dos Mode and How to print it Bold!

                Open "Lpt1" For Output As #1

                Print #1, Chr(27) & "@" 'Initialize printer
                Print #1, Chr(27) & "A" & Chr(11)
                Print #1, Chr(27) & "E" 'Set Font Bold
                Print #1, "Printer is Bold"
                Print #1, "Printer is Bold"
                Print #1, Chr(27) & "F" ' Set Font Normal

                Print #1, "Printer is Normal"
                Print #1, "Printer is Normal"

                Close #1
                End Sub[/CODE]
                Last edited by Killer42; Dec 9 '07, 05:15 AM.

                Comment

                • CarlosFernandez
                  New Member
                  • Jul 2008
                  • 2

                  #9
                  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.

                  Comment

                  • CarlosFernandez
                    New Member
                    • Jul 2008
                    • 2

                    #10
                    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

                    Comment

                    Working...