我正在尝试使用 evopdf 将 html 转换为 pdf,并且在我的 html 中有一个带有绝对路径的图像,但图像无法将其加载到 pdf 中。这里的“sb”是字符串生成器,我在其中附加了 html 字符串。
PdfConverter pdf = new PdfConverter();
byte[] outPdfBuffer = pdf.GetPdfBytesFromHtmlString(sb.ToString());
HttpContext.Current.Response.BinaryWrite(outPdfBuffer);
HttpContext.Current.Response.End();
因为我给出了完整路径,所以我没有给出基本 url,这是我在 html 中的图像:
<img src="C:/Users/ingyadav/Desktop/icons/icons/logo_160.png" alt="Symphony Summit"/>
谁可以帮我这个事