Join a screenshot to a report
It works great but I need to include in my PDF report some screenshots (in fact, I'm developing a 3D "house simulator" and I want to send to the customer the result of his simulation, meaning a report with all the products included in his house and several 3D views of the house).
Can JsReport allow me to do that ?
Please try to elaborate more. How do you obtain the screenshots? They are saved somewhere as files?
The chrome-pdf can normally render images from HTML to the pdf.
For now, my screenshots are not available : I planned to use something like html2canvas to generate screenshots, but as I wanted to make a client-only app, I didn’t plan to store the screenshots on a server.
Any help would be appreciated :-)
Can I use one of jsReport's features to get a screenshot and integrate it into a PDF report ?
If I can't integrate it in my existing report, can I produce a second PDF report with my screenshots ?
How about this approach...
You use custom jsreport script to fetch the screenshot image from a remote URL, convert image to the base64 and embed it to the report.
The scripts documentation is here
Finally, that's pretty much what I did : I'm taking my screenshots, store them into variables then I generate my report and include these screenshots in it.
Thanks for your help :-)
Another question : I did it using phantom-pdf (less complicated to install for me). Do I need to use chrome-pdf instead, for my needs, or is it okay to use phantom-pdf (as it works perfectly) ?
Keep using what works for you the best. :)
The downside of the phantom is that it isn't maintained.
So in the time, it may be problematic to run it on newer OS versions for example.
I think I'll stay with phantom-pdf at the beginning...