Results 1 to 11 of 11

Thread: [RESOLVED] Printer Power Save

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    UK
    Posts
    199

    Resolved [RESOLVED] Printer Power Save

    Hi All

    I have an Oki C7350 Colour Laser printer.
    It goes into power save (which I would like to keep set, as is) after x mins.

    The trouble is, when I send a print job, it takes ages to come out of power save and warm up before printing.

    This is used for retail receipt printing from my own VB6 system and causes a long wait for the customer before the print job is complete.

    What I would like to do is send some sort of command/dummy print job to the printer at the start of the sale process, so that when the sale is complete and the receipt is ready to be printed, the printer is out of power save, warmed up and ready to jump to life immediately.

    Ideally, something in VB6 would be best, but I am able to shell a DOS command if needs be.


    Over to you guys now, as you are all far better than me at this sort of thing.

    Thanks in advance.

    Paul
    Last edited by PaulTilley; Nov 19th, 2010 at 11:44 AM.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Printer Power Save

    i did that before with an oki laser, but it stopped working after some upgrade of windows or something, i have not tried since
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: Printer Power Save

    Its possible you may have to send it a blank page using;

    Printer.Print " "
    Printer.enddoc

    but you may get by with just a

    Printer.Print " ";

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Printer Power Save

    vb Code:
    1. Printer.Print
    2. Printer.EndDoc
    this will certainly awaken the printer, but unfortunately it also prints a blank page each time

    i am sure originally i used
    vb Code:
    1. Printer.Print
    2. Printer.KillDoc
    but at some point this stopped working, i believe it was because of changes to the windows spooler, where the document was cancelled at the spooler, and not sent on to the printer
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    UK
    Posts
    199

    Re: Printer Power Save

    Thanks for the points guys - im going to try it out now.

    If it fails are there any more ideas out there?

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    UK
    Posts
    199

    Re: Printer Power Save

    Update...

    Whatever I seem to do results in a blank page being printed.


    Any other ideas?

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    UK
    Posts
    199

    Re: Printer Power Save

    As an update....

    I have now decided to move the printing of the receipt a stage earlier, so that the printer has more time to complete the natural process that it does.

    Thanks for the suggestions though.


    Paul

  8. #8
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: [RESOLVED] Printer Power Save

    Are you sure you tried

    Printer.Print " ";

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    UK
    Posts
    199

    Printer Power Save

    Hi

    Yes I have tried that - it sucessfully puts a job into the Windows spooler, but nothing else happens.

    If I then do a printer.enddoc I get a blank page printed.
    But if I do a printer.killdoc it kills it from the spooler, never getting to the printer, and therefore doing nothing at all.

    Ahhhh!!!
    Last edited by PaulTilley; Nov 19th, 2010 at 11:42 AM.

  10. #10
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Printer Power Save

    i have not tried this, but if you send a document to the printer set to a manual tray, so it has to wait for user to feed paper, then cancel document from printing, there is some possibility it may work, but will require code to get into the printer queue to cancel the pending printjob

    vb Code:
    1. Printer.PaperBin = 258
    2. Printer.Print
    3. Printer.NewPage
    4. i = Timer
    5. Do Until Timer > i + 60  ' adjust delay to suit
    6.     DoEvents
    7. Loop
    8. Printer.KillDoc
    works, will require printer setting to print directly, not use spooler, which is probably fine for receipt printer
    Last edited by westconn1; Nov 19th, 2010 at 03:38 PM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    UK
    Posts
    199

    Re: Printer Power Save

    Hmmmmm......Interesting....... I like your line of thinking.

    I will need to try this out. It sounds like it **SHOULD** work in theory, providing I can kill the print job at the printer.

    Not sure how I am going to achieve this yet as printing RAW will obviously not use the spooler.

    I'll be back once I've tested it.

    Many thanks for the pointers.

Tags for this Thread

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