So, I write PHP component, that can print documents via IPP (Internet Printing Protocol). But I can not print HTML document (text|html - mimetype) correct. Printer has printed this type as RAW. May be somebody give example of correct request (header and body)?
For example my incorrect request, that was printed as RAW data.
Headers:
POST /printers/CanonLPR HTTP/1.1
Host: 10.2.2.105:631
Connection: close
Accept-encoding: gzip, deflate
User-agent: EHttpClient
Content-Type: application/ipp
Content-Length: 772
Body:
Gattributes-charsetutf-8Hattributes-natural-languageen_usEprinter-uri'http://10.2.2.105:631/printers/CanonLPRDrequesting-user-name
PHP-SERVERIdocument-format text/html<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="language" content="ru" />
</head>
<body>
<img style="float: left; margin-right: 10px;" src="/static/img/printer.png" />
<h1>Test page</h1>
</body>
</html>