How to stop page ejection after printing?-VBForums
Results 1 to 6 of 6

Thread: How to stop page ejection after printing?

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2004
    Location
    KOLHAPUR, INDIA
    Posts
    32

    How to stop page ejection after printing?

    Hello everybody.

    Can someone please tell me how to stop the page ejecting from the printer after the printing of the print document has completed?

    I use VB.Net and have tried setting the HasMorePages of the PrintPageEventArgs to false. However, it does not work. I have to print on a paper roll, so I cannot let the printer push the paper forward to complete the page height.

    Here is the code sample.

    pDoc is the PrintDocument object.

    VB Code:
    1. Private sub pDoc_PrintPage(sender as object, e as PrintPageEventArgs) Handles pDoc.PrintPage
    2.     'Printing Code goes here.
    3.    
    4.     'After the printing is finished
    5.     e.HasMorePages = False
    6. End Sub

    Please help me. It is urgent.

    Thanks in advance.

    NIKHIL

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    97,394

    Re: How to stop page ejection after printing?

    You may be able to change the paper size using the PrinterSettings or PageSettings class, but that's just specualtion.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: How to stop page ejection after printing?

    Hope we're not talking about a laser printer here.
    I don't live here any more.

  4. #4

    Thread Starter
    Member
    Join Date
    Apr 2004
    Location
    KOLHAPUR, INDIA
    Posts
    32

    Re: How to stop page ejection after printing?

    You're right Woss

    This is not for a laser printer, but for a Dot Matrix Printer.

    Thanks for considering.

    Please help me out.

    NIKHIL

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: How to stop page ejection after printing?

    I have tried using dot matrix printers before in .net and its a nightmare if its an old printer (mine is about 15 years old and has no windows drivers). Does your have drivers and stuff?
    I don't live here any more.

  6. #6

    Thread Starter
    Member
    Join Date
    Apr 2004
    Location
    KOLHAPUR, INDIA
    Posts
    32

    Re: How to stop page ejection after printing?

    Yes, it is an Epson LX-300 Printer and has got all the required stuff (drivers) for Windows.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.