Closed manhnguyenquoc closed 5 years ago
node-native-printer is not intended to render and print, but only to print raw files. So, printing an HTML will output raw tags.
If you need to render your HTML first, you can take a look at this package: you can generate and save a temporary PDF and print it
@MatteoMeil, has a method to render HTML before print, I want make a feature, but I don't have idea where to start in right method, render HTML in pdf and print the pdf is right method to solve this?
Yes, it's the only method to print a rendered HTML page by now. This plugin is meant to pront files as-is, so it does not provide any kind of preprocessing or rendering. I'm currently non maintaining the repository but I planned to bugfix it and make some improvement, including HTML rendering, but I don't know when I'll can. I'm sorry
Il mar 20 ott 2020, 14:29 Felipe Gustavo notifications@github.com ha scritto:
@MatteoMeil https://github.com/MatteoMeil, has a method to render HTML before print, I want make a feature, but I don't have idea where to start in right method, render HTML in pdf and print the pdf is right method to solve this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MatteoMeil/node-native-printer/issues/17#issuecomment-712814142, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDW4JNMILPOJEAOAZFCI4DSLV7B7ANCNFSM4HSESYAQ .
Describe the bug I try to print a html file but it prints like a raw text without rendering any html tags. How can I fix this?
To Reproduce This is my nodejs code:
This is my html:
And the result:
OS
Packages