antonmihaylov / OpenXmlTemplates

Word .docx templating system that is designer (no scripting tags) and server-friendly (no word installation required)
GNU Lesser General Public License v3.0
89 stars 25 forks source link

Any way to handle conditional images? #14

Closed dgwaldo closed 3 years ago

dgwaldo commented 3 years ago

Is there any way to handle conditional images with the library as is currently? One of our use cases requires us to insert the users signature file (.png) into the document. Curious if there is a known way to handle this, or if it could be a feature in the future :)

antonmihaylov commented 3 years ago

Currently it doesn't support adding images, only text, but it could be useful potentially.

Do you have any ideas how this could happen, or what the API would look like?

dgwaldo commented 3 years ago

Our project has a requirement to produce .pdfs, so we also pulled in this library. https://github.com/smartinmedia/Net-Core-DocX-HTML-To-PDF-Converter

I think that library is also using Document.Format.OpenXml, there is a blurb at the bottom of that readme about inserting images but I haven't checked it out past that. If I get some time I can try to have a look at what they're doing.