Closed dacxjo closed 7 months ago
I'm too, I wanna resolve this soon :(
Hola @silvaignacio , al parecer este repositorio quedó sin mantenimiento, lo que yo hice fue utilizar puppeteer con su método pdf (https://pptr.dev/#?product=Puppeteer&version=v13.2.0&show=api-pagepdfoptions) y handlebars para los templates, es un poco más de trabajo pero me funcionó perfectamente
Eso estaba viendo, Pupetter, gracias por la acotación.
It works if you use base64 data image. Inspired by this: https://stackoverflow.com/questions/49938443/e-mail-doesnt-display-base64-image-using-handlebars-js
Example:
const options = {
locals: {
headerImgSrc: 'data:image/gif;base64,R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==',
},
};
return this.pdfService.toStream('templateName', options);
<div class="header">
<img src="{{headerImgSrc}}" >
</div>
I can't load images stored on the server, i have tried with the juice config webResources, relativeTo and reabaseRelativeTo, but it doesn't work..
Please help.