No announcement yet.

Printing to server side (POS printer)

  • Filter
  • Time
  • Show
Clear All
new posts

  • Printing to server side (POS printer)

    Hi all,

    There are threads talking about printing to pos,using for example qz-print but we are developing a printer server app we need. We can do it on other language,but we would like to do it on PHP if possible, and access to it as web service.

    Our problem is I don't find too much information about server side printing. Some talks about accessing printer via network (\\machine\sharedPrinter) and others talks about a windows only and not maintained extension (php-printer)

    Access via network has the problem we have to sent plain text, and then we can't send to it barcodes,images and so on....conclusion, not cute tickets. I found an extension on github but its for network printers ,and we need to maintain compatibility with USB printers.

    I asked on SO without success...

    Has you some experience on this?


    Professional Scriptcase Services
    Some Customers opinions

  • #2
    Hi Giu
    i did one time server side printing. I make a PDF with PHP Code und saved it in a directory in server. A small shell script does the rest:
    inotifywait -e close_write ./ | while filep
    	lpr $filep
    	rm $filep
    This looks for new file, sends it with lpr to printer and deletes the pdf. Check that the script runs with a user who has permission to print and the webserver needs permission to write to the directory of course.

    Because they printed a lot, we had 4 Printers configured with cups on the server.

    This works pretty good with no problems. Hope this helps for you.