Flayms / Markdown2Pdf

.NET library for converting markdown to PDF.
https://www.nuget.org/packages/Markdown2Pdf/
MIT License
5 stars 1 forks source link

How can I add img element in HeaderHtml? #72

Closed ABatenev closed 4 months ago

ABatenev commented 4 months ago

If I add img tag in HeaderHtml, for example: HeaderHtml = "<img src=\"test.png\" alt =\"Text\"/>" Or HeaderHtml = "<img src=\"https://mobile.photoprocenter.ru/files/4552_0.jpg\" alt =\"Text\"/>" The image is not displayed, no matter what path I specify.

Flayms commented 4 months ago

Take a look at https://github.com/puppeteer/puppeteer/issues/2443 It seems like this functionality is not supported within puppeteer. Try base64 encoding the image.

Let me know if this works!

ABatenev commented 4 months ago

Yes, this work for me, thanks!