When's The Printer Done?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Deadly_Bait

    #1

    When's The Printer Done?

    I'm working on an office application that's going to need to print out
    300+ billing statements. Since that seems like a lot, I'm thinking
    that will slow things down, which would be bad. So then I thought
    that it would be cool if I could just send a billing statement to the
    printer when the printer wasn't busy printing. Send them to the
    printer one-at-a-time.

    System.Drawing. Printing.PrintD ocument.EndPrin t seemed to be the event
    I wanted. It even says "Occurs when the last page of the document has
    printed.". Unfortunately, it seems to fire every time a billing
    statement is sent to the printer's spool. This means that all my 300+
    billing statements get sent to the printer and then it prints them.

    That's not what we're shooting for. I want to send the printer the
    first billing statement, have it print it, send it the next billing
    statement, have it print it, send it the next... etc.

    Maybe I'm trying to do something weird, but it makes sense to me. It
    would make it a lot easier to cancel the printing too. If I'm sending
    billing statements to the printer one-at-a-time it would be easy to
    flip a flag and have stop the loop that's sending the statements to
    the printer.

    Does anybody have any ideas? Surely I'm not trying to do the
    impossible... right? Thanks for you help!

    Deadly_Bait
  • Ron Allen

    #2
    Re: When's The Printer Done?

    You should be able to get some information using WMI and the Win32_Printer
    object. I would think that the Availability property should have what you
    are looking for although you may have to experiment to see which of these
    bits means exactly what you want.

    Ron Allen
    "Deadly_Bai t" <brycelindsey@h otmail.com> wrote in message
    news:3d111b40.0 310091600.6a405 75d@posting.goo gle.com...[color=blue]
    > I'm working on an office application that's going to need to print out
    > 300+ billing statements. Since that seems like a lot, I'm thinking
    > that will slow things down, which would be bad. So then I thought
    > that it would be cool if I could just send a billing statement to the
    > printer when the printer wasn't busy printing. Send them to the
    > printer one-at-a-time.
    >
    > System.Drawing. Printing.PrintD ocument.EndPrin t seemed to be the event
    > I wanted. It even says "Occurs when the last page of the document has
    > printed.". Unfortunately, it seems to fire every time a billing
    > statement is sent to the printer's spool. This means that all my 300+
    > billing statements get sent to the printer and then it prints them.
    >
    > That's not what we're shooting for. I want to send the printer the
    > first billing statement, have it print it, send it the next billing
    > statement, have it print it, send it the next... etc.
    >
    > Maybe I'm trying to do something weird, but it makes sense to me. It
    > would make it a lot easier to cancel the printing too. If I'm sending
    > billing statements to the printer one-at-a-time it would be easy to
    > flip a flag and have stop the loop that's sending the statements to
    > the printer.
    >
    > Does anybody have any ideas? Surely I'm not trying to do the
    > impossible... right? Thanks for you help!
    >
    > Deadly_Bait[/color]


    Comment

    Working...