1

This may seem a silly question, but here it goes anyway...

Is it possible, somehow, to send ESC/POS codes in a PDF? I know how to do it using a COM or LPT direct connection.

But now i am developing a web application and the client has asked to open the cash drawer after an invoice is printed... The obvious problem is that the browser is outputting a PDF file, i am not directly connected to any port that allows me to send raw data.

Does anybody know if a solution for this problem, any workaround? Any light on this matter would be much appreciated...

Thank you

  • PDF is not a physical electronic connection; it is a data file format. – Robert Harvey Mar 10 '14 at 21:19
  • 1
    Not via PDF. Try using [jZebra](https://code.google.com/p/jzebra/). – Blorgbeard Mar 10 '14 at 21:20
  • Why don't you just send the codes in raw form after the invoice is printed? – Robert Harvey Mar 10 '14 at 21:21
  • @RobertHarvey I am aware PDF is not a physical connection, and that is exactly my problem. I was hopping that CUPS or WinSpool was able to interpret some code in PDF and then send it to the printer. I was being naive, i know. How do you suggest i send the raw codes, after the invoice is printed? I am in browser session... – CrazyMenConnected Mar 10 '14 at 21:54
  • Is the browser in the same physical location as the cash drawer? If it is, there are a number of mechanisms that you can use to call executable programs from the browser. – Robert Harvey Mar 10 '14 at 21:57
  • In this case yes, it is! You mean something like https://code.google.com/p/jzebra/ like @Blorgbeard suggested? – CrazyMenConnected Mar 10 '14 at 22:11
  • Essentially what you want to do is not possible, since browsers have no means to talk to cash drawers or serial ports, and neither do any PDF readers. You would have to create something else and install it locally on the computer. In the past, it was possible to do this with ActiveX controls, but those are not really worth the trouble anymore. – O'Rooney Nov 07 '14 at 00:56

0 Answers0