Tuesday, December 19, 2017

RE: print option with django application

We use gsprint (for Windows printing) and Ghostscript.
http://pages.cs.wisc.edu/~ghost/gsview/gsprint.htm
https://www.ghostscript.com/

We have generic print view, and when users click on a button on the UI, our app generates a PDF and then sends that to a printer on the local network. The printers are all set up under the user who is running the web server, in this case, Apache. To print to printers at the user's desk, we turned on print sharing for those printers and set up the web server user to be able to print to those from the server hosting the webserver. We have a model, ComputerProfile, that associates a shared printer with a client computer. If the user is logged into that computer, the app choose the printer at that computer. There is also a default printer as a fall back.

Yes, you can print directly to a printer from Django (or any web app) using this method.

-----Original Message-----
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of johnf
Sent: Tuesday, December 19, 2017 8:38 AM
To: django-users@googlegroups.com
Subject: Re: print option with django application

I wonder what solutions there are for print from a django app? Is it possible to use reportlab for example.  Or is there some other solution that is normally used from django apps?

Johnf


On 12/19/2017 05:47 AM, Larry Martell wrote:
> On Tue, Dec 19, 2017 at 1:50 AM, Ketul Suthar <k2lsuthar@gmail.com> wrote:
>> I want to print data from database when user click on print button.
>>
>> how can I achieve it ?
>>
>> Is there any in-built module in djnago for printing data ?
> You cannot force the user to print. What I do in these situations is
> generate a pfd (with wkhtmltopdf) and then the user can print that.
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d7bf8abe-f500-f97d-d9bd-836d12620ff7%40jfcomputer.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1e3b462fa0d046168994f38a7eea9b3b%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment