I have implemented a module where i m trying to generate a PDF.PDF is generated successfully using MVCRAZORtppdf
.
But now I want to add a image on PDF as well.How to add a image on PDF. And I want to add image on controller level.
I have implemented a module where i m trying to generate a PDF.PDF is generated successfully using MVCRAZORtppdf
.
But now I want to add a image on PDF as well.How to add a image on PDF. And I want to add image on controller level.
Here is my solution done completely inside view:
If you want to set an image in Controller, I guess you can use ViewBag to set value in imagePath variable.
However, keep in mind that you can use Razor's if-then-else statement and set value dynamically in View.