Printing receipts with TakePOS

The three ways TakePOS prints a receipt in Dolibarr 24, tested with a simulated ESC/POS printer: settings, receipt template and tags, automatic printing, cash drawer, and the faults that leave the receipt blank or cut short.

Versions concerned
Dolibarr 24.0.2 (tested: official Docker image 24.0.1 with its code replaced by 24.0.2, which was not on Docker Hub on 14/10/2026; MariaDB 11.4, PHP 8.2)
What was checked
Tests on 14/10/2026 on a fresh Dolibarr 24.0.2 instance (country France), actions done in the interface: TakePOS sales with a line discount and two VAT rates, receipt printed by the browser and reprinted, options of the Printers / Receipt tab, header and footer variables, Receipt printers module with a simulated network printer (TCP server on port 9100 recording the ESC/POS bytes received), test pages, receipt templates, automatic printing, cash drawer button and command, unreachable printer, Bar Restaurant mode, requests sent to TakePOS Connector intercepted in the browser (the software itself not tested). Labels checked on screen in English. Dolibarr 24.0.2 code read (takepos/index.php, invoice.php, receipt.php, ajax/ajax.php, admin/receipt.php, admin/terminal.php, takepos/class/dolreceiptprinter.class.php, admin/receiptprinter.php) and compared with versions 21.0.4, 22.0.5 and 23.0.4.

TakePOS, Dolibarr’s point of sale, can print a receipt in three ways. Which one is used does not depend only on what you set on screen: in Dolibarr 24, choosing a receipt printer for the till is not enough for it to be used. That explains many “my printer prints nothing” questions.

This guide was written on 14 October 2026 on Dolibarr 24.0.2, by making real sales in TakePOS. The printer was simulated: a small program that receives what Dolibarr sends on port 9100, like a network printer, and records it byte by byte. So we see exactly what Dolibarr transmits, but not how a given printer brand renders it on paper.

The three ways to print

Who sends the receipt to the printer What you need
Browser (default) the till’s browser, through its print window a printer installed on the till computer
Receipt printer (Receipt printers module) the Dolibarr server, as ESC/POS commands a printer the server can reach
TakePOS Connector the browser, to software installed on the till external software, plus two hidden settings

The difference that matters: with the Receipt printers module, the server connects to the printer. The description of this method in Dolibarr’s translation files says so: the server hosting the application cannot be in the cloud, it must be able to reach the printers on your network. If your Dolibarr is hosted online and the printer is in the shop, this method will not see it (we did not test it with real hosting: this is what Dolibarr says, and what the code does).

Method 1: the browser

This is the setting of a fresh installation. After Payment, the Print ticket button opens the receipt in a window and Dolibarr calls the browser’s print function. You choose the printer in the print window, as for any web page.

The options are in Home › Setup › Modules/Applications, POS TakePOS card, gear icon, Printers / Receipt tab:

  • Group VAT by rate in tickets|receipts: without it, the receipt shows a single total tax line. With it, one line per rate (in our test: 5.5 % and 20 %);
  • Free text on invoices - Header and - Footer: free text at the top and bottom of the receipt (see the variables below);
  • Receipt Name: replaces the “invoice ref” label in front of the number;
  • Print customer on tickets|receipts: adds the customer’s name (according to the code, nothing is added for the till’s generic customer);
  • Print payment method on tickets|receipts: adds the payment and, for cash, the amount received and the change;
  • Display the column with the price excluding tax (on the receipt);
  • Automatically print tickets|receipts: see below.

The receipt shows the company name, the reference, the terminal, the date, the Date of printing, then the lines. A line discount is not shown as such: the printed price is already discounted (a mug at €12.00 with 10 % off appears at €10.80).

A small help icon next to these two fields lists the Available substitution variables. On the receipt, not all of them are replaced. What we checked:

Variable On the receipt
__MYCOMPANY_ADDRESS__, __MYCOMPANY_ZIP__, __MYCOMPANY_TOWN__ replaced (company address)
__MYCOMPANY_PROFID2__ (SIRET in France), __MYCOMPANY_VATNUMBER__ replaced
__USER_FIRSTNAME__, __USER_LOGIN__ replaced by the user logged in at the till
__THIRDPARTY_NAME__, __THIRDPARTY_FAX__, __REF__ printed as is
__TOTAL_TTC__ replaced by… nothing

So customer and sale variables do not work on the receipt, even though they are in the help list. For the customer’s name there is the Print customer on tickets|receipts option. For any other customer information (a price level, a customer type) there is no setting: it takes a module that provides its own receipt (Dolibarr has a hook for this, TakeposReceipt, in the receipt file).

Reprinting: DUPLICATA

Dolibarr counts the prints of each paid receipt. The second time you click Print ticket for the same sale, the receipt carries *** DUPLICATA *** under the date of printing.

Method 2: an ESC/POS receipt printer

ESC/POS is the language of most thermal receipt printers. Here Dolibarr builds the receipt itself as ESC/POS commands and sends it to the printer, with no print window.

1. Enable the module

Home › Setup › Modules/Applications, Receipt printers card, enable. The module adds the choice of printer and receipt template to the setup of each TakePOS terminal.

2. Declare the printer

Gear icon of the card: page Setup of module RAW/Text Printers, List of Printers tab. Fill in Name, Type and Parameters, then Add.

Type Parameters (Dolibarr’s examples)
Network Printer IP address and port: 192.168.1.50:9100
Local Printer /dev/usb/lp0: a USB port of the server
Local Windows Printer LPT1, COM1 or an smb://… share
Cups Printer the printer’s name in CUPS
Dummy Printer prints nothing

We only tested the Network Printer type, with port 9100 (the one in Dolibarr’s example, 10.x.x.x:9100).

Each printer has two test links: TXT sends a few lines (“Hello World!”, “Most simple example”) then a paper cut; IMG adds an image and a barcode. The message Test Sent To Printer Caisse appears… even when sending failed: read the messages below it (see “Common faults”).

3. Choose the printer and template for the till

TakePOS setup, terminal tab (one tab per terminal, named after the terminal):

  • Main printer to use (leave empty to use the browser printer system): your printer;
  • Main receipt template to use: the receipt template (next section). Choose one, do not leave this line empty.

4. The trap: in a shop, this setting is not enough

After these three steps we made a sale: Print ticket opened the browser receipt, and the printer received nothing.

The reason is in TakePOS’s code: the receipt printer is only used for receipts if Bar Restaurant mode is enabled, or if a hidden constant is set to receiptprinter. This behaviour is in the code of 23.0.4 and 24.0.2, not in 22.0.5. There is no checkbox for this constant. For a shop:

  1. Home › Setup › Other Setup;
  2. name TAKEPOS_PRINT_METHOD, value receiptprinter, Add (the constant already exists with the value browser: it is replaced).

Reopen the till: Print ticket now sends the receipt to the printer, and the till briefly shows “Sent to printer Caisse”.

The other solution is to enable Bar Restaurant mode (tab of the same name): we checked it, the receipt then also goes to the printer. But this mode is meant for bars and restaurants (tables, orders sent to the kitchen): for a shop, the constant is simpler.

With the receiptprinter method, the Printers / Receipt tab no longer shows the header, footer, receipt name, or the customer and payment options: the receipt content comes only from the template.

The receipt template

Templates are set in the Receipt printers module setup, Template Setup tab. The page lists all available tags with their description. A template is a text where each line starts with a tag in curly braces.

Do not use the supplied templates

When the module is enabled, it creates a template named Example (in an instance installed in French, “Exemple”). In 24.0.2 it is stored wrongly: its line breaks are written as the literal characters \r\n, and these characters are printed on the receipt (“Épicerie Test Dolix\r\n1 rue de Saint-Hippolyte\r\n67100Strasbourg\r\n”). The postcode and town are also stuck together.

If no template is chosen, it is worse:

  • choosing the empty line in Main receipt template to use stores the value -1, and the receipt comes out blank: Dolibarr only sends the printer initialisation command;
  • if the setting was never saved, Dolibarr uses a template written in its code. In 24.0.2 that template stops after the address: it contains a tag that does not exist ({dol_value_mysoc_vatnumber}), and printing crashes on a PHP error. The rest of the receipt (lines, totals, cut) is never sent. This is not fixed in Dolibarr’s 24.0 branch as of 14/10/2026.

So create your own template and choose it on each terminal.

A template that works

Here is our test template; only the fixed words are translated into English. Paste it into the Template field, give it a Name, then Add; the printer icon on its line sends a test receipt.

{dol_align_center}
{dol_bold}{dol_double_height}{dol_print_text}{dol_value_mysoc_name}
{dol_default_height_width}{dol_bold_disabled}
{dol_print_text}{dol_value_mysoc_address}
{dol_print_text}{dol_value_mysoc_zip} {dol_value_mysoc_town}
{dol_print_text}Company ID {dol_value_mysoc_idprof2} - VAT {dol_value_mysoc_tva_intra}
{dol_line_feed}
{dol_print_text}Receipt {dol_value_object_ref}
{dol_print_text}Printed on {dol_value_currentdate}
{dol_print_text}Served by {dol_value_vendor_firstname}
{dol_line_feed}
{dol_align_left}
{dol_print_object_lines}
{dol_print_object_tax}
{dol_line_feed}
{dol_bold}
{dol_print_object_total}
{dol_bold_disabled}
{dol_print_payment}
{dol_line_feed}
{dol_align_center}
{dol_print_text}Thank you for your visit!
{dol_line_feed}
{dol_cut_paper_partial}
{dol_open_drawer}

After a sale of coffee, tea (5.5 % VAT) and a discounted mug (20 % VAT), the printer received the company name in bold and double height, the address, the receipt reference, the lines, one VAT line per rate, the totals excluding tax, tax and including tax, the cash payment and the change, then the paper cut and the drawer opening.

The most useful tags

Tag Effect
{dol_align_center}, {dol_align_left}, {dol_align_right} alignment of the following lines
{dol_bold} / {dol_bold_disabled} bold on / off
{dol_double_height}, {dol_double_width}, {dol_default_height_width} text size
{dol_print_text} prints the text that follows on the line
{dol_value_mysoc_name}, …_address, …_zip, …_town, …_idprof2, …_tva_intra your company
{dol_value_object_ref} invoice reference
{dol_value_currentdate} date and time of printing
{dol_value_vendor_firstname} first name of the till user
{dol_print_object_lines} the lines sold
{dol_print_object_tax} one line per VAT rate
{dol_print_object_total} totals excluding tax, tax, including tax
{dol_print_payment} payments and change
{dol_line_feed} empty line
{dol_cut_paper_full} / {dol_cut_paper_partial} paper cut
{dol_open_drawer} cash drawer opening pulse

{dol_value_date_time} (invoice date and time) prints 00:00 as the time: a TakePOS invoice has no time. For the time, use {dol_value_currentdate}.

Three rules so you do not break the receipt

  1. Only use tags from the list on the Template Setup page. An unknown tag alone on its line prints its name in capitals (DOL_VALUE_CUSTOMER_MOBILE) and shows an UnknowTag error.
  2. Never put an unknown tag right after {dol_print_text}. In our test, {dol_print_text}{dol_value_customer_mobile} stopped the receipt at that point (PHP error Printer::text(): Argument #1 ($str) must be of type string, null given). This is what breaks the built-in template.
  3. An empty value is not a problem: {dol_print_text}{dol_value_mysoc_url} with no website set prints an empty line.

What the template does not fix

We saw this on the receipts received, with no way to change it in the template:

  • item lines are 51 to 54 characters long while Dolibarr counts 48 characters per line: on a 48-column printer they will probably wrap (not checked on a real printer);
  • the unit price printed is the price excluding tax, with up to five decimals (7,96209), while the line total includes tax; the discount is not shown;
  • VAT rates print as 5.5000%;
  • in {dol_print_payment}, the change line is labelled Change.

The width is set by the constant RECEIPT_PRINTER_NB_CHARACT_BY_LINE (48 by default) in Home › Setup › Other Setup. At 32 (58 mm printers), the totals fit in 32 characters, the item lines are still 35 characters.

Accented text gets through: Dolibarr converted “Épicerie” into the default character table of ESC/POS printers (code page 437).

Printing automatically after payment

Printers / Receipt tab, Automatically print tickets|receipts option. As soon as the sale is fully paid, TakePOS acts as if Print ticket had been clicked:

  • browser method: the receipt window opens and the browser starts its print window, which still has to be confirmed (unless the browser itself is set up otherwise, not tested here);
  • receipt printer: the receipt goes straight to the printer, without any click (checked).

The cash drawer

Dolibarr does not open the drawer itself: it sends the ESC/POS pulse command (ESC p) to the printer, and the printer, connected to the drawer, opens it. So you need the receipt printer method (or TakePOS Connector): with browser printing, no command is sent to the printer.

Two ways, both tested:

  • On every receipt: the {dol_open_drawer} tag in the template. The drawer opens every time the receipt is printed; the template does not depend on the payment method, so this also happens for a card sale or a reprint (according to the code).
  • With a button in the till: in Home › Setup › Other Setup, add the constant TAKEPOS_ADD_BUTTON_OPEN_DRAWER1 with the value 1 (the final digit is the terminal number: …DRAWER2 for terminal 2). The Open cash drawer button appears in the till; it sends only the opening command to the terminal’s printer, without paper.

The command sent is always the same: ESC p on output 0 (bytes 1B 70 30 3C 78). There is no setting to choose the other drawer output.

Several tills, several printers

Printer and template are chosen per terminal: one terminal tab per till (their number is set in the Parameters tab, Number of Terminals). Each till can therefore have its own printer. We only tested one terminal. Kitchen printers (sending orders without payment) only exist in Bar Restaurant mode; we did not test them.

TakePOS Connector

TakePOS Connector is external software installed on the till computer: the till’s browser sends the receipt to it, which makes printing possible from a Dolibarr hosted online. We did not install it; here is only what Dolibarr 24.0.2 expects, from its code and from the requests we intercepted in the browser. TakePOS’s code calls this method “deprecated”.

No checkbox enables it. Two constants in Home › Setup › Other Setup: TAKEPOS_PRINT_METHOD = takeposconnector, and TAKEPOS_PRINT_SERVER = the connector’s address. Careful: saving the Printers / Receipt tab erases TAKEPOS_PRINT_SERVER (the page saves this value although it has no field to enter it). Check it after every visit to that tab.

Depending on the form of TAKEPOS_PRINT_SERVER:

Value Print ticket Open cash drawer
a URL (http://127.0.0.1:8111) POST to …/printer/index.php, data invoice= + the ESC/POS receipt encoded in base64 (URL variant), built with the terminal’s template POST to …/printer/drawer.php, data opendrawer
an IP address (192.168.1.20) POST to http://192.168.1.20:8111/print, data: the browser receipt as HTML POST to the same address, data opendrawer

In URL mode, the Printers / Receipt tab also shows Weighing scale and Customer display, which call …/scale/index.php and …/display/index.php (read in the code, not tested).

Common faults

What you see Verified cause What to do
A printer is chosen on the terminal, but the browser’s print window opens shop mode: the receipt printer is not used constant TAKEPOS_PRINT_METHOD = receiptprinter
The till shows “Sent to printer…” but nothing comes out this message is shown whatever happens open a setup page: the real error is shown there (Cannot initialise NetworkPrintConnector: Connection refused)
Same message, and no error anywhere no printer chosen on this terminal terminal tab, Main printer to use
Test: “Test Sent To Printer…” followed by initPrinter error: … Connection refused nothing listens at that address (wrong port, printer off) check the IP and port 9100 from the server
Same error with Connection timed out, after a minute the IP address does not answer at all wrong address, other network, or server hosted outside the shop
The receipt comes out blank Main receipt template to use left on the empty line choose a template
The receipt stops after the address Dolibarr’s built-in template, or an unknown tag after {dol_print_text} your own template, tags from the list only
\r\n printed on the receipt the module’s Example template your own template
A name in capitals (DOL_…) on the receipt unknown tag fix the tag
__THIRDPARTY_NAME__ printed as is (browser) variable not replaced on the receipt Print customer on tickets|receipts option
*** DUPLICATA *** second print of the same receipt (browser) normal

Two points read in the code, not reproduced: ESC/POS printing needs the PHP intl extension (Dolibarr 24.0.2 then shows “The receipt printer requires the PHP intl extension”), and the IMG test loads an image, which needs the PHP gd or imagick extension.

In short

  • By default TakePOS prints through the browser; the receipt options are in the Printers / Receipt tab.
  • For an ESC/POS printer: Receipt printers module, network printer IP:9100, printer and template chosen on the terminal, then TAKEPOS_PRINT_METHOD = receiptprinter in Other Setup if you are not in Bar Restaurant mode.
  • Write your own template: in 24.0.2 the Example prints \r\n, the built-in template stops halfway, and an empty template gives a blank receipt.
  • Drawer: {dol_open_drawer} in the template, or TAKEPOS_ADD_BUTTON_OPEN_DRAWER1 = 1 for a button.
  • “Sent to printer” proves nothing: the error shows on the next page.

Next

If you sell to members or regulars who pay in advance, the TakePOS wallet module adds payment from a prepaid balance to the till’s payment screen.

Before changing the setup of a till in use, make a backup: Back up and restore Dolibarr.

If your receipt still does not print, the €90 diagnosis is about looking at your instance and your till with you for an hour, then giving you in writing what blocks and what fixing it would cost.

DolibarrTakePOSreceiptreceipt printerESC/POSnetwork printercash drawerreceipt templateTakePOS Connectorpoint of sale