0

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?

Sujit Y. Kulkarni
  • 1,186
  • 3
  • 22
  • 37
  • Which browser? Have you checked if the printer settings include "scale to fit" or something like that? – Mr Lister Sep 15 '13 at 09:55
  • Browser- Firefox. And no such settings on printer that you said.. – Sujit Y. Kulkarni Sep 15 '13 at 10:32
  • I mean the printer settings for the browser. Depending on the version, FF may have a tab `Format and options` in `File -> Page Setup` with a checkbox called "Shrink to fit page width". Or a tab `Options` in `File -> Print` with a checkbox like that. – Mr Lister Sep 15 '13 at 10:41
  • Yes! Done doing that! Tried scaling to different values including 100%. Plus tried changing layouts like letter, german std fanfold etc.. But didn't work. – Sujit Y. Kulkarni Sep 15 '13 at 11:50

0 Answers0