Вопрос

How can I print a receipt sheet "800 mm width" via my web application?

I tried many times but can't get a cross-browser support for this feature,
for example, Chrome shrinks the page and print a "blurred" text on the receipt, but Firefox just print the right side only of the page "magnified, as if it was an A4 page".

also, after some searching there's no specific solid code to use.

so, what's the best practice to follow in order to enable receipt-printing on our web applications?

Thanks!

Can't post the receipt picture because I'm new here :)

Это было полезно?

Решение

I solved this issue with two actions: i) Table column set to 350 width. ii) Use a css just for printed output. For example, one css file to web display and a second css file that must be invoked just by scripts whose action is to print something. Also when calling the css stylesheet use media="print" in the same <link href=....>

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top