print image with raw-html
See original GitHub issueHi, i’m trying to print a response from a post request. this response, maybe have some images, and i’m not abble to print this images. i need to convert to base64, and because of this, my timing is groing up.
const {data} = await axios.post( url , {
params: params
});
printJS({
type: 'raw-html',
css: css,
scanStyles: true,
printable: data,
targetStyles: ['*'],
});
can i load this images directly, without having to convert them?
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Print.js Raw HTML with Images - CodeSandbox
CodeSandbox is an online editor tailored for web applications.
Read more >Print.js - Javascript library for HTML elements, PDF and image ...
Print.js is a tiny javascript library to help printing from the web. Print friendly support for HTML elements, image files and JSON data....
Read more >Print raw html strings on EJS - node.js - Stack Overflow
Print raw html strings on EJS ... how can i print "html safe" strings? ... Picture perfect images with the modern <img> element....
Read more >linux - What's the best way to render raw HTML and print it (to ...
You could try using wkhtmltopdf, which uses the webkit engine to render an HTML page into a PDF file. Then you can print...
Read more >Print an image - HTML DOM
Print an image ... You can print a web page by clicking the Print menu of browser or pressing the shortcut Ctrl+P (or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @bartolomeukuma, v1.0.57 just got published to npm. It includes the updates from @JandersonConstantino to pre-load raw html images.
Please run
npm update print-js
to get the latest version and give it a try.Sounds good to me. If nobody makes a pull request I will make these changes later.