Closed blau1981 closed 2 months ago
Could you share with me the content of OnProvisionImage?
I don't know what is behind doc.SaveAs but ensure you have called mainPart.Document.Save()
to persist the parsed chunks into the document.
This is the the code: static void OnProvisionImage(object sender, ProvisionImageEventArgs e) { var documentPath = (sender as HtmlConverter).BaseImageUrl.OriginalString; string fileName = e.ImageUrl.OriginalString; e.Provision(File.ReadAllBytes(fileName)); } I need to use SaveAs because it comes from a template and I it does not have an option on create for filename. Html is like this:
<body>
<div>test message</div>
<div>
<table>
<tr>
<td>
<img src="image.png" />
</td>
</tr>
</table>
<br />
</div>
</body>
The code is exposing a IWebRequest interface to allow custom implementation.
Hi, We recently updated from 2.0.1 to 2.0.2 and after the update the import of the images from html file to docx is not longer working when the document is created from a template. The document is created from a blank template.
Thanks