Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Image #37

Open
reemanashalabia opened this issue Dec 23, 2021 · 1 comment
Open

Print Image #37

reemanashalabia opened this issue Dec 23, 2021 · 1 comment

Comments

@reemanashalabia
Copy link

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

@Jaryt
Copy link

Jaryt commented Nov 4, 2024

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: metafloor/zpl-image#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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants