Ishan kashyap
Ishan kashyap

Reputation: 21

Webapp to POS receipt printer connection

I am working on connecting and Epson TM88 printer to my webapp to print receipts.

I have access to printer configuration page just with printers IP address. http://10.0.x.xxx/ Printer ID is 32 from there.

The URL provided in manual is : var url = 'http://10.0.x.x/cgi-bin/epos/service.cgi?devid=32other_printer&timeout=6000';

Using this url returns object not found. And through code it returns 405 (Method not allowed).

PART 2:How do I determine printers connected in network using JS?

Upvotes: 2

Views: 2477

Answers (1)

florian
florian

Reputation: 444

This happens when you make a cross-site xml request and your browser preflights the request. The preflight request uses the OPTIONS verb, which the printer's server does not allow.

This guide is a good resource on the topic. In the comments, a response to a user with a similar problem explains that "You can remove the preflighting by not adding cookies (withCredentials=false) and not setting any headers."

Upvotes: 0

Related Questions