I am generating a pdf document using DinkToPdf and need to embed an image (present in the release folder) using img tag.
I followed this SO Post : Adding <img> HTML tag to C# String
But it only works for internet URLs and not for local disk images
What I tried is var HTML = @"<img src=""/myimage.png""/>"
But no image is displayed once the PDF is generated. But works fine if the path is an internet URL
How can I solve this?
[Edit to clarify the question] The image resides in the server and this needs to be embedded in the first page of the document
You need to specify full path like this if you have your image in folder wwwrootDocumentsImgName.jpg
<img src="https://localhost:50001/Documents/ImgName.jpg">
1.4m articles
1.4m replys
5 comments
56.9k users