Retrieve jobs from Print Queue

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

    #1

    Retrieve jobs from Print Queue

    Hi All,

    Is this possible:
    1) An application prints to a printer/print queue (mainly XP).
    2) A vb.net application monitors the print queue (I know this can be
    done)
    3) Retrieve the RAW information from the PrintJob (Cant seem to find
    anything on this)
    4) Delete the Job when I have the RAW information (I know this can be
    done)

    Currently, I have the application (in #1) print to a LPD print queue,
    which then creates a file in a directory, then the vb.net app picks up
    the file and processes it.. This works pretty good, but if I could get
    the VB.NET app pickup the print job file, then that would suit better.

    Any ideas? Would prefer code, not a commercial solution..

    Thanks,
    Robert
  • Michel Posseth  [MCP]

    #2
    Re: Retrieve jobs from Print Queue


    You are right it all can be done it just requires at least Framework 3.0
    and some digging in the new system.Printing namespace or a lot of API
    knowledge

    You can use PrintQueue.Curr entJobSettings property to get an
    object(PrintJob Settings Class type) that contains the configuration settings
    for the current print job. It has a property CurrentPrintTic ket(PrintTicket
    class type). The PrintTicket members hold all the detailed settings for the
    print job

    HTH

    Michel Posseth
    http://www.vbdotnetcoder.com/.




    "RB0135" <robear@joshie. com.auschreef in bericht
    news:9238e14a-d8b7-448d-b823-c2b9300f6872@x1 g2000prh.google groups.com...
    Hi All,
    >
    Is this possible:
    1) An application prints to a printer/print queue (mainly XP).
    2) A vb.net application monitors the print queue (I know this can be
    done)
    3) Retrieve the RAW information from the PrintJob (Cant seem to find
    anything on this)
    4) Delete the Job when I have the RAW information (I know this can be
    done)
    >
    Currently, I have the application (in #1) print to a LPD print queue,
    which then creates a file in a directory, then the vb.net app picks up
    the file and processes it.. This works pretty good, but if I could get
    the VB.NET app pickup the print job file, then that would suit better.
    >
    Any ideas? Would prefer code, not a commercial solution..
    >
    Thanks,
    Robert

    Comment

    • RB0135

      #3
      Re: Retrieve jobs from Print Queue

      Thanks for that... That gives me a good start.

      Robert


      On Oct 21, 5:41 am, "Michel Posseth [MCP]" <M...@posseth.c omwrote:
      You are right it all can be done it just requires at least Framework 3.0
      and some digging in the new system.Printing  namespace or a lot of API
      knowledge
      >
      You can use PrintQueue.Curr entJobSettings property to get an
      object(PrintJob Settings Class type) that contains the configuration settings
      for the current print job. It has a property CurrentPrintTic ket(PrintTicket
      class type). The PrintTicket members hold all the detailed settings for the
      print job
      >
      HTH
      >
      Michel Possethhttp://www.vbdotnetcod er.com/.
      >
      "RB0135" <rob...@joshie. com.auschreef in berichtnews:923 8e14a-d8b7-448d-b823-c2b9300f6872@x1 g2000prh.google groups.com...
      >
      >
      >
      Hi All,
      >
      Is this possible:
      1) An application prints to a printer/print queue (mainly XP).
      2) A vb.net application monitors the print queue (I know this can be
      done)
      3) Retrieve the RAW information from the PrintJob (Cant seem to find
      anything on this)
      4) Delete the Job when I have the RAW information (I know this can be
      done)
      >
      Currently, I have the application (in #1) print to a LPD print queue,
      which then creates a file in a directory, then the vb.net app picks up
      the file and processes it.. This works pretty good, but if I could get
      the VB.NET app pickup the print job file, then that would suit better.
      >
      Any ideas? Would prefer code, not a commercial solution..
      >
      Thanks,
      Robert- Hide quoted text -
      >
      - Show quoted text -

      Comment

      Working...