adding paths to image files via metadata variables for docx templates #10372
Unanswered
amine-aboufirass
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently working on a custom docx template for a specific class of documents I will need to regularly generate, converting from markdown to docx. I first manually created the template file with some dummy data, extracted the docx to zip format and copied the
document.xml
file into my working directory.After introducing some metadata variables in the
document.xml
and compiling my input markdown file, it looks like they are being interpolated and formatted properly. However, it turns out that my template contains about 3 images, 2 of which will need to change for every instance of the document class I create. Ideally I would like to be able to provide relative paths to these images in my metadata as follows:However it looks like this is harder to do, considering that OpenXML seems to prefer adding media to the document.xml using relationship IDs.
Is there support for adding paths to image files via metadata variables for docx templates? If not has anyone ever run into a similar problem and found a workaround?
Beta Was this translation helpful? Give feedback.
All reactions