Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to know print given to network printer is success

How to know print given to network printer is success

Scheduled Pinned Locked Moved Visual Basic
sysadmintutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sri_0099
    wrote on last edited by
    #1

    Hello All, I have called PrintDocument.Print() method to print given document. How to check given print is success or not. Regards, Sri

    D 1 Reply Last reply
    0
    • S sri_0099

      Hello All, I have called PrintDocument.Print() method to print given document. How to check given print is success or not. Regards, Sri

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Normally, you don't. Normally, once your app prints it, your app shouldn't care at all about the job. The job may get hung up in the queue for various reasons, including being about 20th in line to print, none of which are the responsibility of your app to report. It may be an hour before the job actually makes it to paper, even if theres nothing wrong. Those conditions are left up to the printing system to report to the user, not your app. Normally... What is your app doing that you feel the need to know if the doc printed or not?

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008
      But no longer in 2009...

      S 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Normally, you don't. Normally, once your app prints it, your app shouldn't care at all about the job. The job may get hung up in the queue for various reasons, including being about 20th in line to print, none of which are the responsibility of your app to report. It may be an hour before the job actually makes it to paper, even if theres nothing wrong. Those conditions are left up to the printing system to report to the user, not your app. Normally... What is your app doing that you feel the need to know if the doc printed or not?

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        S Offline
        S Offline
        sri_0099
        wrote on last edited by
        #3

        Thanks Dave, My application is printing checks. Before printing check number is saved to database. If print fails at any reason (Paper Jam,Paper Out,Not connected...etc) i nedd to update database with default check number "000000". Thats why i need print staus of check. Dave, Can you please give me idea to get the status.Please Thanks, Sri

        D 1 Reply Last reply
        0
        • S sri_0099

          Thanks Dave, My application is printing checks. Before printing check number is saved to database. If print fails at any reason (Paper Jam,Paper Out,Not connected...etc) i nedd to update database with default check number "000000". Thats why i need print staus of check. Dave, Can you please give me idea to get the status.Please Thanks, Sri

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You'd have to get the information using the classes in the System.Printing[^] namespace. This is oknly available in .NET 3.0 and above. If you're using .NET 2.0 and below, you'd either have to use WMI and the System.Management namespace to do something like this, or implement printing directly to the printer without going through the print spooler. You can find an example of that here[[^](http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/35575dd8-7593-4fe6-9b57-
          64ad6b5f7ae6/ "New Window")].

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups