Apache is running under a system account. A quick test of running
Apache under my user account enabled printing indeed. I'll follow your
suggestion and create a dedicated user with restricted rights to run
Apache under.

Thanks so much for your help

Marc

On Aug 27, 2:42 am, Sam Lai <samuel....@gmail.com> wrote:
> 2009/8/27 mettwoch <mettw...@pt.lu>:
>
>
>
> > I'm now using Foxit Reader. Thanks for the tip. The following works
> > perfectly in the Django shell and prints the document in
> > attachment.file.path to the specified network printer:
>
> > p = Popen (['C:\\Program Files\\Foxit Software\\Foxit Reader\\Foxit
> > Reader.exe',
> >        '/t',
> >        attachment.file.path,
> >        '\\\\SM03\\HPCOMPTOIR0'])
>
> > The same code works silently in a Apache / mod_wsgi context but does
> > not produce any result on the printer. Do You have any ideas?
>
> Could be a permissions issue - what user is apache running under?
>
> Also, you might want to try enabling the 'allow service to interact
> with desktop' option to see if that works. If it does, you might have
> to look at another solution or somehow impersonating another user to
> do the printing as there are security risks associated with this
> option.
>
>
>
> > Marc
>
> > On Aug 26, 1:46 am, Sam Lai <samuel....@gmail.com> wrote:
> >> Use python to call a PDF reader via the command line -
>
> >>http://support.adobe.com/devsup/devsup.nsf/docs/52080.htm
>
> >>http://foxit.vo.llnwd.net/o28/pub/foxit/manual/enu/FoxitReader30_Manu...
> >> (see the Command Line section)
>
> >> Depending on the complexity of your PDFs, I'd recommend using Foxit
> >> instead; Adobe Reader on windows isn't the most stable especially when
> >> it comes to open many PDFs - you might have to manually manage
> >> instances to make sure it doesn't eat up all your memory. Foxit Reader
> >> however doesn't render all PDFs perfectly, or at least the same way
> >> that Adobe Reader does. YMMV though.
>
> >> 2009/8/26 mettwoch <mettw...@pt.lu>:
>
> >> > How do the Django people handle printing directly on Windows? I
> >> > remembered abouthttp://timgolden.me.uk/python/win32_how_do_i/print.html,
> >> > but unfortunately his method for PDFs only print on the default
> >> > printer. I need the server to produce the PDF, save it (works already)
> >> > and send it to a specific shared printer on the network. The printer
> >> > should be determined from a table that holds 'host' - 'printer' pairs
> >> > e.g. ('PC01', '\\PC01\PR01'). The host ('PC01') determined from the
> >> > http request allows to choose the right printer ('\\PC01\PR01') from
> >> > that table.
>
> >> > Printing should be executed directly when the user has submitted the
> >> > request. Any solution that pops up the document locally in a PDFReader
> >> > and where the user has to hit the print button is not viable.
>
> >> > Kindly Yours
> >> > Marc
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to