Print Node Integration for Frappe Framework

@EnSeal just search for “Print Node Settings” in the search bar, you will find one screen link this

In your print node account, setup a new api Key, under API section, like this

Install Print Node in your computer and share the printers, save the settings, everytime, the you need to update the printers.

You just need to configure the actions, how as showed previously in this post

1 Like

Thank you very much…:+1:

Hey really appreciate your help so far, i am still trying to get a walkaround the whole process

i am trying to setup XML-ESC/POS but not sure how to do this… i am getting the error message below…
Any tips on this will be much appreciated.

/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/uti l/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not availabl e. This prevents urllib3 from configuring SSL appropriately and may cause certai n SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/securi ty.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading pyxmlescpos-0.1.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-or1X6d/pyxmlescpos/setup.py”, line 11, in
with open(path.join(here, ‘DESCRIPTION.rst’), encoding=‘utf-8’) as f:
File “/usr/lib/python2.7/codecs.py”, line 878, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: ‘/tmp/pip-build-or1X6d/pyxmles cpos/DESCRIPTION.rst’

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-or 1X6d/pyxmlescpos/
/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/uti l/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not availabl e. This prevents urllib3 from configuring SSL appropriately and may cause certai n SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/securi ty.html#insecureplatformwarning.
InsecurePlatformWarning

@EnSeal according the link present in the message from you console I’m able to find this

InsecurePlatformWarning
This happens on Python 2 platforms that have an outdated ssl module. These older ssl modules can cause some insecure requests to succeed where they should fail and secure requests to fail where they should succeed. Follow the pyOpenSSL guide to resolve this warning.

Certificate verification in Python 2
Older versions of Python 2 are built with an ssl module that lacks SNI support and can lag behind security updates. For these reasons it’s recommended to use pyOpenSSL.

If you install urllib3 with the secure extra, all required packages for certificate verification on Python 2 will be installed:

pip install urllib3[secure]
If you want to install the packages manually, you will need pyOpenSSL, cryptography, idna, and certifi.

Thank you… Very much. Will try fix the issue

@max_morais_dmm First thanks for your great work.Can this print node print a web page like erpnext pos receipt from inbuilt printer of hand held POS device with andriod OS.The device is Telpo TPS 900.Thanks

@Fred1 first:

I think that print node, wont enable printing in mobile devices, due has no kind of client for that platform

Second, if you are making use of Offline POS, you can use printnode for printer in a printer conected with your computer.

@max_morais_dmm Can you make it possible.I believe many other will need it.

@Fred1 yes it is doable, but it is not on my todo list!

@max_morais_dmm

Trust you are doing very well.

Please i am trying to setup a barcode print format with PrintNode, Can you please share the barcode type that could work.

What i have setup is Created Custom Print Format and i have used the tag below. but the code is not scanning. Will appreciate your help on this…

{{ doc.name }}

@EnSeal, I used the Zebra Basic Designer, that I downloaded from there Software de etiquetas ZebraDesigner Essentials 3 | Zebra

I just got the file, from this editor, edited on Notepad ++, and Upload my template into the Print Format
Into Action, of Print Node Integration I checked the option “Raw Text” and I worked fine

1 Like

Can you please explain better on this phrase " I just got the file, from this editor,…" I have a Zebra printer as well.

please i am trying to setup XML ESCPOS, but i am faced with this error while uninstalling

root@ip-:~# pip install pyxmlescpos
Collecting pyxmlescpos
Using cached pyxmlescpos-0.1.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-mlQ6U3/pyxmlescpos/setup.py”, line 11, in
with open(path.join(here, ‘DESCRIPTION.rst’), encoding=‘utf-8’) as f:
File “/usr/lib/python2.7/codecs.py”, line 896, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: ‘/tmp/pip-build-mlQ6U3/pyxmlescpos/DESCRIPTION.rst’

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-mlQ6U3/pyxmlescpos/

pip install -e git+https://github.com/mxmo-co/py-xml-escpos.git#egg=xmlescpos

@max_morais_dmm

thank you that worked fine for me

However, i am having this issue…

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/selling/page/point_of_sale/point_of_sale.py”, line 99, in submit_invoice
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 831, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 820, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 256, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 279, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 245, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 890, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1024, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1009, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/printnode_integration/printnode_integration/events.py”, line 34, in on_submit
print_via_printnode( doc, “Submit” )
File “/home/frappe/frappe-bench/apps/printnode_integration/printnode_integration/events.py”, line 24, in print_via_printnode
api.print_via_printnode(d.name, doctype=doc.doctype, docname=doc.name)
File “/home/frappe/frappe-bench/apps/printnode_integration/printnode_integration/api.py”, line 110, in print_via_printnode
action.is_raw_text
File “/home/frappe/frappe-bench/apps/printnode_integration/printnode_integration/api.py”, line 67, in get_print_content
printer.receipt(content)
File “/home/frappe/frappe-bench/env/src/pyxmlescpos/xmlescpos/escpos.py”, line 721, in receipt
raise e
ParseError: junk after document element: line 16, column 0

@EnSeal, you have something wrong in your template, I dont have a way to know what’s, since the traceback is not enought to evaluate your template.

But the traceback means, that you have somethine really wrong “Junk” on line 16 column 0 of your template

@max_morais_dmm

Thank you for being very helpful. I have been able to make a headway on this.

Face with new Challenge adding table to the receipt design. Any help with a template to play with that includes item description, qty and price.
Tax Subtotal and total…

Will really appreciate any help.

@EnSeal the table on xml escpos are really limited!

I have some workaround for this, but right now, It may take some time, to implement due I need to patch frappe framework.

Hello @max_morais_dmm

trust you are doing very well.

Any update on the workarounds for tables on xml escpos.?

Also have you been able to setup tag printing whit Printnode? Will appreciate if you could share any tips on this…

Regards

It’s on my todo list, but I didn’t have enought time to work on this.

I didn’t got what you mean by tag priting