CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    May 2002
    Posts
    10

    How to print without ejecting paper.

    Masters,

    I'm developing a check printing program and my problem is that everytime I print one check, the printer ejects a lot of the continous checks. My question is, how do you print without ejecting a whole lot of the continous form paper using dot matrix printer? BTW, I initialy declared the custom size of the check (Printer.Papersize) but this did not work. Thanks in advance for help. - Mel

  2. #2
    Join Date
    May 2002
    Posts
    10

    Please help, I'm desperate already!

    Here's my problematic source code:

    Printer.Scalemode = vbInches
    Printer.Width = 7 'but always returns 1440
    Printer.Height = 4 ' but always returns 720

    This is why, the printer ejects so much paper when in fact, I just want to eject the the exact size of the check.

  3. #3
    Join Date
    Jun 2005
    Posts
    4

    Re: How to print without ejecting paper.

    i too facing the same problem i too need help from u

  4. #4
    Join Date
    Jun 2005
    Posts
    4

    Re: How to print without ejecting paper.

    Quote Originally Posted by sravan_kesha
    i too facing the same problem i too need help from u
    i need help about ejecting entire paper at a time

  5. #5
    Join Date
    Sep 2004
    Posts
    265

    Re: How to print without ejecting paper.

    If you are using crystal reports, then have you tried setting the paper width and height

  6. #6
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,900

    Re: How to print without ejecting paper.

    Have you tried


    Printer.Print "Your details your details your details"
    Printer.Print " "
    Printer.Print " "
    Printer.Print " "
    Printer.Print " "
    Printer.Print " "
    Printer.Print " "
    Printer.Print " "
    Printer.Print " "
    Printer.Print " "
    Printer.Print " "

    (as many print lines as required to advance to the next top of form)

    WITHOUT issuing a Printer.EndDoc statement -
    ie, you are controlling the form advance with a line count



    Not sure what effect this will have also

    Have you tried setting

    Printer.ScaleMode = vbInches
    Printer.ScaleWidth = 7
    Printer.ScaleHeight = 4

    And then printing your form


    (Sorry don't have a dot matrix printer available for testing)

  7. #7
    Join Date
    Aug 2005
    Posts
    1

    Re: How to print without ejecting paper.

    without ejecting paper in dot matrix you use the following code

    open "lpt1" for output as #1

    print #1 , "==================================="
    print #1, " TEST PAGE "
    print #1, " "
    print #1, " ==================================

    close #1


    test this close

  8. #8
    Join Date
    Sep 2005
    Location
    Delhi, INDIA
    Posts
    237

    Re: How to print without ejecting paper.

    Thanks JOJO !!
    I'M BACK AGAIN !!
    -------------------------------------------------------------------------
    enjoy the VB !
    If any post helps you, please rate that.
    Always try to findout the Solutions, instead just discussing the problem and its scope!

  9. #9
    Join Date
    Jan 2008
    Posts
    19

    Re: How to print without ejecting paper.

    Quote Originally Posted by OK_Jojo View Post
    without ejecting paper in dot matrix you use the following code

    open "lpt1" for output as #1

    print #1 , "==================================="
    print #1, " TEST PAGE "
    print #1, " "
    print #1, " ==================================

    close #1


    test this close
    1. Is it possible to print in USB DOT Matrix Printer ?
    2. Is it possible to change font size font style for different lines ?

  10. #10
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: How to print without ejecting paper.

    You would need to use control codes for the printer in question if you are using that method
    Always use [code][/code] tags when posting code.

  11. #11
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: How to print without ejecting paper.

    Quote Originally Posted by imagetvr View Post
    1. Is it possible to print in USB DOT Matrix Printer ?
    2. Is it possible to change font size font style for different lines ?
    Please note that this thread is over TEN YEARS OLD. Please do not respond to Very old threads as it messes up forum flow. rtaher start a new thread in future.

    Thanks, and enjoy the forums.

    Hannes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured