I have some printer, its name ATOL FPRINT-22K, it can be connected via USB or COM, but in both cases it will be as a COM PORT DEVICE in system, this printers is used to make fiscal check. So its driver has it`s own protocol with own commands. Do you know some way to send commands to this com port and information about payment? And what commands you think it can use?
You can use Raw printer.
We have a barcode printer sample here. http://sambapos.org/wiki/doku.php/en/barcode_printing_tags. On Barcode Printers section we’re using printer specific TSPL language to format printer output.
Sorry for long time with no answer. There is a big trouble with driver and I have no way to solve it. I can explain:
There is 4 firms in Russia who makes fiscal printers. This printers is not just a printers it is very strange hardware
with its own DLL and its own driver which looks like a program which can configure printer. So we have one of this printer, its name is Atol Fprint-22K. It has its own protocol of commonucation. It is connected with usb, but in system it is visible like Other Hardware, it simulating COM PORT. In Samba Pos we can print to port, but protocol of communication, as it shown in user manual and in protocol manual is in hex type.
But here is another way. In Russia we have a program which is called 1C, and manufacture of this printer has a special DLL file which can be registred in system, using comman regsrv32.exe nameofdll.DLL, and then we can choose it like interpritator for fiscal printers in program 1C. After that we can use simple commands for fiscal printer, like action.set=print line “text”. So here is a light version of describing. At this time I have no solution for this problem.
Continuing the discussion from Russian printers:
I have such a problem with printer:
For example we have code in Java language (In other languages the same logic)
// Driver variable
var ECR;
// making object driver
ECR = new ActiveXObject (“AddIn.FPrnM45”);
// Opening visual tab for printer options
ECR.ShowProperties ();
Also we can use commands like:
// Z-report
// set admin pass for fiscal printer
ECR.Password = “30”;
// enter to end point report
ECR.Mode = 3;
if (ECR.SetMode() != 0)
ECR.DeviceEnabled = 0;
// getting report
ECR.ReportType = 1;
if (ECR.Report() != 0)
ECR.DeviceEnabled = 0;
All this commands are similar for other programming languages. Main question is - how to send this commands through Samba to OLE driver of this printer?
For VB its like Set ECR = CreateObject(“AddIn.FprnM45”)
If you have good VB and MEF framework experience you can inject a custom printer by using ICustomPrinter interface. Three ICustomPrinter implementations demonstrated for V3 here.
These printers activates by choosing printer type as Custom.
You can create a lib for V4 by referencing Samba.Services.Common.dll and implementing ICustomPrinter interface for your printer. When it works templated printer output redirects to your custom printer (Process method) and you can send it to printer as you want.
Sorry for that limited knowledge. As it is a little advanced topic it is hard to explain without showing working examples but we’re planning to release some open source demo implementations for V5 custom printers, custom payment processors and custom addon modules.
So I realized my printer through JS script which can make pre printed to file template with ticket. Thank you for advice. Can you add to V5 such a little thing - a dialog window that can associate some DLL files with a comand for scripting. example -
printer.dll - comand - UsePrinter.custom
So we can load any dll for any device and use it with its own language, tha use our custom dlls?