Open Madcheese101 opened 2 months ago
if this is not possible using the current version of the package, can you please guide me to the right direction?
When using the Seagull Bartender Program, it prints successfully and the print command looks like this:
SIZE 52.7 mm, 28.9 mm
DIRECTION 0,0
REFERENCE 0,0
OFFSET 0 mm
SET PEEL OFF
SET CUTTER OFF
SET TEAR ON
CLS
BITMAP 127,30,20,40,1,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïü ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÃø ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûÁàÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðƒÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðCÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿà÷ƒÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþ?ÿÿü ?À ÿð?À ?ÿÿ ð ÿð ÿÿ ÿð ÿÿ ÿð ÿÿøÿñ€Ïÿñ€çþÿÿ þ ÿñà~ïÿñà~çþ?ÿÿÿÿøøþÿÿøøþçþ?ÿÿŸÿ€øùþÿÿøùþçþÿÿ‡ÿàøqþÿÿøqþ?ãþÿÿÆ?ÿð |cþ?ÿÿücþ?ãÿÿÿàÿø þ ÿ?ÿÿþ þáÿ ÿÿàÿÿþþÿ?ÿÿþþàÿÿÿóÿÿÿƒÿ?ÿÿÿÿ?ÿðÿÏÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿñÿïÿÿÿÿÿÿÿÿÿÿ‡ÿÿÿÿÿŸùÿÿÿÿÿÿÿÿÿÿÿÿÃÿÿÿÿÿßýÿÿÿÿÿÿÿÿÿÿÿÿÃÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿãÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûÿÿÿÿÿßÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‡ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿƒÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‡ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
BARCODE 323,200,"128M",78,0,180,3,6,"!10512345678"
CODEPAGE 1252
TEXT 269,114,"3",180,1,1,"12345678"
PRINT 1,1
the result looks like this:
what do I need to do to convert a (PIL image object)/Image to get a command string like this?
options: { language: "tspl-ez" },
TSPL-EZ isn't an image format, but rather a compatibility to allow certain printer firmwares to emulate EPL/ZPL. Please specify one of those instead.
Valid options are:
zpl
epl
cpcl
escpos
evolis
sbpl
pgl
When using the Seagull Bartender Program, it prints successfully and the print command looks like this:
BITMAP 127,30,20,40,1, ... ...
The BITMAP
command is part of the TSPL programming language. We haven't yet added support for this into QZ Tray.
The TSPL BITMAP command is described here:
Adding support should be trivial because we already use a similar technique for other languages.
would you mind pointing me to where that code that gets the image data to the printing code result?
Your package is included with the
frappe bench framework
, before runningnpm update qz-tray
it used to result in a similar error but with my website link included before the base64 stringI hope that you guide me on this matter because I am lost in this one. My Label Printer does not support the Arabic language and the only option I could think of was to make an image of that and pass it to the printer.
In this example, I am only testing passing the base64 string of an image saved in a memory object; A real use case would be sending a command that contains the barcode and its number using the
TSPL commands
for it, and then under it, I would like to write text in Arabic (can only be done using theTSPL Bitmap
command)note: English text can be passed to the printer perfectly fine using the
TSPL Text
commandPython Code:
JS Code
ERROR RESULT: