My client requires to print challan/invoice on pre-formatted paper where labels are already there on paper, and values are generated through a web application (fetched by php code). They use Epson's FX 2175 dot matrix.
I've seen that, documents printed via Notepad or PDF get printed nicely, but the html data from our web app. Main issue is, text gets shrinked/compressed such that, letter spacing is almost none. To add more to confusion, 2 out of 5 times, this won't even happen! Print will be as good as expected.
I've tried things like media queries for print - media @print{....}
, changing printer settings, restarting printer, etc. Other solutions I found on stack point towards doing this thing by using plugins like jspdf, which would convert html to pdf and then do the next thing, print. But I'm thinking is as a last option.
So by now, I have concluded that the problem is with printing html document, since other stuff looks nice on printouts taken on the same printer. What could be the cause exactly? print from html not supported? Or printer is buggy?