onizet / html2openxml

Html2OpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments into templated Word.
MIT License
321 stars 109 forks source link

Base64 Image Processing Problem #40

Closed richie86 closed 5 years ago

richie86 commented 5 years ago

Doesn't seems to work for me. Was thinking to troubleshooting with manual provision from sample code below found at https://github.com/onizet/html2openxml/wiki/ImageProcessing private void converter_ProvisionImage(object sender, ProvisionImageEventArgs e) { // Read the image from the file system: e.Data = File.ReadAllBytes(@"c:\inetpub\wwwroot\mysite\images\" + e.ImageUrl); }

but e.Data is undefined (did something changed? I can't see any properties with Data in ProvisionImageEventArgs class)

onizet commented 5 years ago

Hi Richie,

You are right, some changes have been applied during the migration to netcore. You must now call e.Provision([binary]). Can you share with me (you can PM if you prefer) your base64 image? I have different test cases and I'm curious why it is not correctly interpreted.

richie86 commented 5 years ago

`

`