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. InvalidPrinterException when printer is installed and working - only with HP LaserJet 1010 series

InvalidPrinterException when printer is installed and working - only with HP LaserJet 1010 series

Scheduled Pinned Locked Moved C#
helpcsharptutorialquestion
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.
  • D Offline
    D Offline
    Dragan Matic
    wrote on last edited by
    #1

    I am having a problem with with printing from .Net 2.0 on HP LaserJet 1010 printers. Occasionally (sometimes once a month, sometimes once a day) printer gets 'blocked' in such a manner that it can not print anything from .net 2.0. When printDocument.print method is invoked, it throws InvalidPrinterException, even if printer has just been selected from printDialog. Printer is online and working (everything else can be printed on it), only printing that goes through .net is blocked. The problem seems that printer name is not recognised even if it is returned by PrintDialog, and printDocument.PrinterSettings.IsValid is false. Even a simple example like this doesn't work: printDialog1.Document = printDocument1; printDialog1.ShowDialog(); // after printer gets blocked, isValid is allways 'false' if (printDocument1.PrinterSettings.IsValid) printDocument1.Print(); else MessageBox.Show("Error!"); The way to 'unblock' the printer is to simply change its name (printers and faxes / right click on printer / rename) or reinstall the printer. After that printer gets unblocked and works for some time until it gets blocked again (while it is 'blocked', it can still print from other programs, only .net programs are blocked). This only happens with HP LaserJet 1010 and 1018 printers. All the other printers work perfectly. On some computers these printers get occasionally blocked, while on some computers printers work perfectly. Printers are installed with newest drivers, .net is 2.0 with service pack and computer operator works as an administrator for a local machine. Any idea why this blocking is occuring? Tnx in advance Dragan Matic

    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