Because people were misusing local resources almost all access to hard drives, printers, etc. has been disabled in browsers. The two ways around this are:
1) Write an ActiveX plug-in that is installed in the browser that can send to the printer. 2) Either display a printable HTML page in the browser or create a PDF report that gets downloaded to the Acrobat Reader plug-in of the browser. Then all the user has to do is hit the print button. Most people choose option 2 -Larry Kevin Cole wrote: > Hi, > > This falls under the "myopic-leading-the-blind" department. ;-) I'm helping > a friend who wants to have his web site send something directly to his > printer when a web form is submitted. We're working with Windoze XP, > Apache2, and Python 2.4. > > He has two printers, one directly connected and another one on a network. > When run directly from the command line, my code has no problems printing > to either printer. However, when printing via the web, it prints to the > local printer okay but gives the following error, in the apache error.log, > when printing to the network printer (edited for brevity). > >> jobID = StartDocPrinter(lpr, 1, ("Delivery",None,None)) >> pywintypes.error: (1775, 'StartDocPrinter', 'A null context handle was >> passed from the client to the host during a remote procedure call.') > > While searching the web, I found vague references to the problem being > related to ASP.NET, and adding <identity impersonate="true"> to a > "Web.config" file, but it doesn't help me much. I didn't think I was using > ASP.NET, and am not sure where "Web.config" should live or what else it > should contain. (http://blogs.msdn.com/bryanke/articles/71491.aspx) > > Any ideas what's going wrong here? > > Thanks in advance. > > P.S. If you'd be kind enough to CC me as well as the list, it would be > appreciated. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32