I am using QZ Tray tool to send raw data to thermal printer using ESC/POS commands. This is the code I’m using and it’s working as expected on most printers:
data = [
"x1bx40",
"x1bx74x49", // ESC t 73 - switch to Windows-1251
text + "rn",
"x1Bx74x48", // ESC t 72 - switch to Windows-1250
text + "rn",
];
let config = qz.configs.create('printer_name', { encoding: 'windows-1251' });
qz.print(config, print_data).catch(function(e) {
console.error(e);
});
The issues I am having are with Birch CP-Q3 printer. This printer doesn’t seem to execute ESC t n
command if the n is greater than 33. Like that it doesn’t recognize those code pages. Command ESC t n
works fine if the n is less than 33.
Strangest thing is that I can switch code page to 73 for example using printer tool, but it can’t be done using ESC/POS commands. Printer self test also contains those code pages.
Is there a command that I should execute before changing code page or a printer configuration that I can change so that extended code pages can be used?