Closed beabri closed 3 years ago
Hi everyone,
my HTML content has a base64 background image which is not rendered at all. The CSS rule is this:
html { zoom: 1; background-image: url('data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABkAAD/4QPtaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzE0MCA3OS4xNjA0NTEsIDIwMTcvMDUvMDYtMDE6MDg6MjEgICAgICAgICI......'); background-repeat: no-repeat; background-size: cover; width:595px; height:839px; }
I read that using puppeteer library the issue can be solved this way (from https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions):
But how can we set this using your "convertHTMLToPDF" function?
Inserting "printBackground: true" as page option did the job.
Hi everyone,
my HTML content has a base64 background image which is not rendered at all. The CSS rule is this:
I read that using puppeteer library the issue can be solved this way (from https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions):
But how can we set this using your "convertHTMLToPDF" function?