JSPrintManager icon indicating copy to clipboard operation
JSPrintManager copied to clipboard

Print Image

Open reemanashalabia opened this issue 3 years ago • 1 comments

hello .. i'm using the source code in this article https://www.neodynamic.com/articles/Print-HTML-from-Javascript-to-client-printer-without-print-dialog-silently/ but the print outcome is not good. it is very very small can you help me ?? WhatsApp Image 2021-12-22 at 3 48 57 PM

reemanashalabia avatar Dec 23 '21 12:12 reemanashalabia

To all future travelers - I've had great success passing the output from https://github.com/metafloor/zpl-image to this. Although - worth noting that there's a breaking issue in the npm package: https://github.com/metafloor/zpl-image/pull/12

When I was setting up JSPrintManager I didn't even know this article existed before hand, and ended up going the html-2-canvas route myself as well. If you go this route, make sure to set scale to be paperInfo.dpi / 96 to achieve proper scaling. 96 is the DPI inherent to html2canvas it seems. You'll probably need to do a manual offset to get it rendering properly as well.

Happy printing!

Jaryt avatar Nov 04 '24 13:11 Jaryt