Rotativa
Rotativa copied to clipboard
Images not rendering
Objective: generate e-mail with embeded image, as well as generate email attachment as pdf with image in it. In this case all images are retrieved from Database, not stored in the server file system at all.
The View becomes the body of the e-mail and in the View, When using :
The action method acquires the image from the database. It' shows fine in the body of the e-mail, but it is missing in the pdf.
The conversion of the View to PDF gets executed, but the image is not displaying.
I looks like the conversion to pdf is executed before the image is acquired. Any suggestions???
Perhaps it will be nice to be able to capture a rendered view first as a string and then do the conversion to PDF of the string which will contain the embedded image, but I do not see any Rotativa action method that will take a string and do the conversion to pdf.
You can use @Server.MapPath("~/path/to/your/image.png")