POS Printer

38 views
Skip to first unread message

Asif Foysal

unread,
May 31, 2022, 10:07:13 AM5/31/22
to Django users
How to use POS printer in Django  

Paul Kudla (SCOM.CA Internet Services Inc.)

unread,
May 31, 2022, 1:23:06 PM5/31/22
to django...@googlegroups.com

ok a few zillion requirements

You need something that will generate a pdf file and then send it to a
printer / email etc

Basically Pillow libs needs to be installed to generate a pdf file

from there is is system dependant

if running linux / freebsd then i would write the pdf file into the /tmp
folder (make sure you set the rights of /tmp to 777)

next to be able to print you will need ghostscript / cups

cups needs the printer to be on your network (NOT USB Preferably)

USB Can be made to work but requires a whole wack of printer setup on
the stations.

also Report Lab (Pillow libs)

#PDF (Report Lab Stuff)
from reportlab.pdfgen import canvas
from reportlab.lib.units import inch
from reportlab.lib.pagesizes import letter, A4
from reportlab.lib import colors
from reportlab.graphics.shapes import *
from reportlab.platypus import SimpleDocTemplate, Image

from reportlab.lib.colors import PCMYKColor, PCMYKColorSep, Color,
black, blue, red, orange


please understand that this is very rough approach

if you need more info a can send my django code if nessesary but is
tailered to my system

fyi





Happy Tuesday !!!
Thanks - paul

Paul Kudla


Scom.ca Internet Services <http://www.scom.ca>
004-1009 Byron Street South
Whitby, Ontario - Canada
L1N 4S3

Toronto 416.642.7266
Main 1.866.411.7266
Fax 1.888.892.7266
Email pa...@scom.ca

On 5/31/2022 10:00 AM, Asif Foysal wrote:
> How to use POS printer in Django
>
> --
> 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...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/23dc7e2f-3650-4ddb-8212-7a509f797fe1n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/23dc7e2f-3650-4ddb-8212-7a509f797fe1n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.

Dev femibadmus

unread,
May 31, 2022, 4:32:59 PM5/31/22
to django...@googlegroups.com
Nice

To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bb26b262-97c7-5d24-e34c-e67b3ddd3bc2%40scom.ca.

Mike Dewhirst

unread,
May 31, 2022, 9:26:09 PM5/31/22
to django...@googlegroups.com
Paul

I agree with @Dev. Nice. And generous. I'm saving this email into my 'keep'.

Cheers

Mike
--
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.

OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages