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. C#
  4. PrintTicket in GetPrintJobInfoCollection?

PrintTicket in GetPrintJobInfoCollection?

Scheduled Pinned Locked Moved C#
helpcomsysadminquestioncareer
1 Posts 1 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.
  • M Offline
    M Offline
    murali_utr
    wrote on last edited by
    #1

    Here is my code. I Get the printticket from print job. I Need Printjob informations like copycount, media size, media type, duplex printing and other details. But I can default values from the printticket like copycount is always 1 and sometime no. of pages in job also comes 0. Now struggle with this problem. I Need Help to solve this problem. PrintServer myPrintServer = new PrintServer(@"\\MyMachine"); PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues(); foreach (PrintQueue pq in myPrintQueues) { if (pq.QueueStatus != PrintQueueStatus.Error) { foreach (PrintSystemJobInfo job in pq.GetPrintJobInfoCollection()) { if (bNewJob == true) { PrintTicket pt = job.HostingPrintQueue.CurrentJobSettings.CurrentPrintTicket; UpdateText("Current Copies : " + pt.CopyCount.Value.ToString()); UpdateText("Default Copies : " + dpt.CopyCount.Value.ToString()); UpdateText("User Copies : " + upt.CopyCount.Value.ToString()); UpdateText("Full Name :" + job.HostingPrintQueue.FullName.ToString()); UpdateText("Job ID : " + job.JobIdentifier.ToString()); UpdateText("Job Name : " + job.JobName.ToString()); DateTime dt = job.TimeJobSubmitted; UpdateText("Submitter :" + job.Submitter.ToString()); UpdateText("Date:"+dt.Day.ToString()+"/"+dt.Month.ToString()+"/"+ dt.Year.ToString()); UpdateText("Hosted Server :" + job.HostingPrintServer.Name.ToString()); UpdateText("No of Pages :" + job.NumberOfPages.ToString()); } } } }

    Have A Nice Day! Murali.M Blog

    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