How can I make Samba auto decide page length, Receipt Printer

This could possibly be a request for @emre already spoken and wanted to post a topic.

I am using a Brother QL-5700 Label printer, with continuous labels. For this to work, I have to go to Print Mangament,
before clicking properties, of that Brother printer
After that I goto

and then from

I’m able to adjust the length of the continuous feed from here.
In that picture I have it set to 30mm, but with some names/order tags the print template sometimes may exceed 30mm, and as a result it will cut the label and print another 30mm label with teh remainder of the template ontop of it.

Inside Samba my Pritner is setup as

My mappings:

and finally the printer template I am using.

[LAYOUT]
<span style="text-align:center;">
<span style="font-size:10px;text-align:center;font-family:'Tahoma'">

<L00>{DATE}          #{TICKET NO}           {TIME}
</span>
</span>
<L00>-------------------------------


{ORDERS}
</span>
<span style="font-size:14px;text-align:right;font-family:'Tahoma'">
<L00>{ENTITY DATA:Students:CName} ({ENTITY DATA:Students:Year})
</span>
[ORDERS]

-- Normal Order Format



<span style="font-size:24px;text-align:left;font-family:'Bebas Neue'">
<L00>{NAME}
</span>
<span style="font-size:8px;text-align:left;font-family:'Tahoma'">{ORDER TAG LIST:Sauce} 
</span>

{ORDER TAGS}




[ORDERS:Gift]

-- Gift Order Format

<span style="font-size:12px;text-align:center;font-family:'Tahoma'">

<L00>{NAME}|**GIFT**

</span>




[ORDERS:Void]

-- Nothing will print for void lines

We print without knowing the model / kind of attached printer. We ask to windows os how printer is setup and it tells us page dimensions / etc. Applications specifically developed for your printer model will have more settings because they directly communicate with device in a language printer understands. That language is a standard in thermal printers. It is called ESC/POS and all thermal printers understands that. So we have ESC/POS support. For label printers there are also standard languages such as ZPL, EPL, etc… but as I searched on internet brother label printers have a specific command set. http://download.brother.com/welcome/docp000678/cv_qlseries_eng_raster_600.pdf

So to be able to enable printer specific features such as enabling auto height we need to communicate directly with printer in the language it understands instead of communicating with it through windows driver. To be able to release such communication with SambaPOS by default it should be a standard language every printer understands but I don’t think brother label printers are widely used in restaurants.

I didn’t searched it a lot but if your printer supports a standard language such as ZPL or EPL you can use Raw Printer to send commands directly to printer. Under Barcode Label Printers section of this document https://sambapos.org/wiki/doku.php/en/barcode_printing_tags you can find a sample. If it does not support any language other than brother printer commands -that explained in the pdf I’ve referenced on top-, you may try to find which commands enables auto width feature on printer and try to make it work with raw printer.

5 Likes

Mmm, I can see that. I’m not sure what Im really askinf for here, but can’t the program after reading the page dimensions from windows, coudlnt it use the preivew to work out the length of the document and use that to send to the printer?

Well it turns out @emre Brother already have this feature in the driver :disappointed_relieved: I spent so much time trying to get raw printing working.

Turns out all I had to do was click this option in the default print properties

Well it was a little disappointing not having such an important setting on driver but I’m glad you found it.

1 Like