IMAGE commands in the document body are ignored when a Shape/image is already present in header or footer
See original GitHub issueSure ! Here is a very simple template that is failing. I’m using the method injectSvg() that is in the documentation : 7078ebf0-16fe-68d6-0e45-e78a25feb224.docx
createReport({
template: templateFile,
data: {
},
noSandbox: true,
cmdDelimiter: ['{{', '}}'],
additionalJsContext: {
injectSvg: () => {
const svg_data = Buffer.from(...., 'utf-8');
return { width: 6, height: 6, data: svg_data, extension: '.svg' };
}
}
})
(Just replace the Buffer.from(...)
by the one that is in the documentation)
And the generated document : fail.docx
_Originally posted by @matcobat in https://github.com/guigrpa/docx-templates/issues/144#issuecomment-870393351_
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Cannot use local file for --header-html and --footer-html #1645
I am using the library through a wrapper for nodejs. I was able to extract the command that is ultimately executed. wkhtmltopdf --header-html...
Read more >Changing Header and Footer Commands in Notepad
To change headers and footers. Choose Page Setup from the File menu and enter the desired command(s) in the Header and Footer text...
Read more >Adding an image to a header in LaTeX - TeX
So, is there a way to have these images ignore whitespace? graphics · header-footer · Share.
Read more >background-size - CSS: Cascading Style Sheets | MDN
The background-size CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, ...
Read more >display | CSS-Tricks
Every element on a web page is a rectangular box. The display property in CSS determines just how that rectangular box behaves.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Many thanks ! It’s working like a charm now !
Should be fixed in https://github.com/guigrpa/docx-templates/releases/tag/v4.6.4.
GH Actions should be publishing it to NPM right now. Let me know if you encounter anything weird. Thanks for reporting!