UNIT6-open / TemplateEngine.Docx

Smart docx template engine for .NET
Other
408 stars 136 forks source link

Filling ImageContent and with images of arbitrary size #53

Open hasanayan opened 6 years ago

hasanayan commented 6 years ago

I would like to be able able to protect the aspect ratio of the images I am placing in my template.

My Picture Content Control is inside a table cell and I am trying to make sure my image shrinks respecting the original aspect ratio just enough to fit in.

For this, I could resize the image myself, before using it to fill the control. I understand this is outside the scope of TemplateEngine.Docx,. However, I couldn't find a better place to ask this. Could someone show me the way to solve this?

mahdiit commented 6 years ago

i have same problem, i generate image with fixed size, because it can not apply accept ratio on it. if we can change height or width of image template dynamically i can control over how generate image it can be better,

seems that there is not solution with TemplateEngine, i think first i need a docx changer, a component that can change template before TemplateEngine work. and change image or font or fields dynamically. then using TemplateEngine to set fields.

chedva215 commented 4 years ago

i have same problem ineed help because all match me without this