Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capture/View everything that is printed (POS/Receipt)

I need a way to capture everything that is printed in my notebook.

Why?

I have a system, in PHP, and sometimes I need to print (php_printer) some invoices, but this costs a lot paper.

Printing is sent in the background without any popup windows for user confirmation.

So every time I send something to the printer, the windows (or any application) show me what was sent; or generate a PDF.

The problem is: How can I use this 'alternativa' without changing the printer (driver, etc). Because, if I do that, I need to test in 2 printers, and you know what I mean.

EscPos

This is the file that I used to print in windows or linux. I develop in windows (requirement of the company) but publish it in a linux server.

gist: https://gist.github.com/patrickmaciel/7673875

What I want

To capture every printed file and save it in a PDF or some driver/application in order to not print the file but rather show it to me on the screen (windows).

Setup

Dev OS (my): Windows 7 (Yes I know, but my employee only works with windows)
Prod OS: CentOS
Printer: TM-T88IV AFU (Epson)

like image 375
Patrick Maciel Avatar asked Jun 11 '13 16:06

Patrick Maciel


People also ask

How do I get a POS receipt?

Go to Administration > POS Settings > POS Receipts. Choose one of the following: To create a new POS receipt, click Add New. To modify an existing POS receipt, click the Name of the receipt that you want to modify.

What is POS receipt printer?

POS printers (Point of Sales) are those that, as the name suggests, are used in points of sales for the printing of receipts, which are usually found in supermarkets, shops, restaurants, hotels, etc. in which speed and reliability are necessary at all times.


1 Answers

To my question apparently no solution.

So I just edited it with the class and EscPos.php added a method to be executed after printing, writing a simplified way to print invoice in a txt file, which I monitor after filename.txt command tail-f.

Solution code: https://gist.github.com/patrickmaciel/7677891

Thanks guys.

like image 116
Patrick Maciel Avatar answered Oct 17 '22 16:10

Patrick Maciel