-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
I've spent quite a bit of time using the TemplateProcessor
now, but I'm stuck on the adding of images. Is there a consensus on how to do this? I see there are several PRs, but none of them seem to have been merged. What I've tried so far:
-
I tested @FBnil 's suggestion in Insert image in TemplateProcessor #1079 to replace existing images, which works on itself, but I need more flexibility as it can only really work if you code against a particular document, whereas we will have loads of different templates with a variable number of images.
-
@ejn 's solution in New function in TemplateProcessor to add images to documents #1084 looked very promising, however it doesn't work for me, I get the following message when opening the document:
After clicking "ok" here, I get the option to "recover the contents", which works, but it's not a viable solution as we can't provide "broken" documents to our users.
The template: empty.docx
The output: CV_680989964_Test_Name_20180507-114821.docx -
TemplateProcessor->setImageValue() #1170 by @SailorMax works fine, however it's not possible to set the size of the image in the template variable which is something we'd need to be able to manage inside the templates.
What is the recommended way to do this (if there is any).