evilc0des / docxtemplater-image-module-free Goto Github PK
View Code? Open in Web Editor NEWThis project forked from maxrcd/open-docxtemplater-image-module
Open Source Image Module for docxtemplater
License: Other
This project forked from maxrcd/open-docxtemplater-image-module
Open Source Image Module for docxtemplater
License: Other
It seems that {%% image} is not supported
File opening is corrupt
docxtemplater-image-module-free @1.1.1
docxtemplater 3.5
it comes when doc.render()
Error: Scope parser execution failed
at new XTScopeParserError (lexer.js:237)
at getScopeParserExecutionError (lexer.js:237)
at ScopeManager.getValue (lexer.js:237)
at ImageModule.render (imgManager.js:122)
at moduleRender (lexer.js:237)
at lexer.js:237
at Array.map ()
at render (lexer.js:237)
at XmlTemplater.render (lexer.js:237)
at expand-pair-trait.js:140(env: Windows,mp,1.05.2105170; lib: 2.17.3)
Hi.
If i don't provide image data then lib fails because of this line
https://github.com/evilc0des/docxtemplater-image-module-free/blob/master/es6/index.js#L101
original repo: https://github.com/edi9999/docxtemplater-image-module/blob/master/es6/index.js#L96
that actually set always undefined value. But the core expects a promise or null.
I expected in this case to go through nullGetter callback to resolve null values.
Hi,
I get this error in chrome (version 74):
Uncaught (in promise) TypeError: Cannot assign to read only property 'namespaceURI' of object '#'
at ImgManager.addImageRels (imagemodule.js:353)
at imagemodule.js:164
at async Promise.all (index 0)
at async Promise.all (index 1)
When I comment this line I get this error:
Uncaught (in promise) TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of type 'Node'.
at xml2str (VM204 doc-utils.js:145)
at eval (VM203 docxtemplater.js:298)
at Array.forEach ()
at Docxtemplater.syncZip (VM203 docxtemplater.js:295)
at Docxtemplater.render (VM203 docxtemplater.js:287)
/* *************************************************************************** */
And this error in firefox (version 66):
TypeError: setting getter-only property "namespaceURI"
When I comment this line I get this error:
TypeError: Argument 1 of XMLSerializer.serializeToString does not implement interface Node.
/* *************************************************************************** */
How can I solve this error?
Thanks
Using the demo code in the READ.ME, this error was raised.
[Log] {"error":[{"message":"Attempted to assign to readonly property.","properties":{"file":"word/document.xml"},"line":323,"column":10,"sourceURL":"http://127.0.0.1:5500/build/imagemodule.js","stack":"addExtensionRels@http://127.0.0.1:5500/build/imagemodule.js:323:10\naddImageRels@http://127.0.0.1:5500/build/imagemodule.js:350:25\n@http://127.0.0.1:5500/build/imagemodule.js:164:38\npromiseReactionJob@[native code]"}]} (docxtemplater.js, line 1098)
[Error] Unhandled Promise Rejection: TemplateError: Multi error
promiseEmptyOnRejected
promiseReactionJob
Getting the following dialog from Mac OSX Microsoft Word when opening a docx that used this plugin to populate images. Bypassing this (i.e. clicking Yes
in the popup) pulls up the document without issues and images show as expected, just figured there's something that could be fixed in this plugin to prevent the dialog ever showing at all.
Critical vulnerability with xmldom
GHSA-crh6-fp67-6883
Hi,
I was running docxtemplater version 3.14.5 with the image module and was working fine. Recently due to a requirement for including angular-parser(https://docxtemplater.com/docs/angular-parse/), which requires a docxtemplater version > 3.32.3, I upgraded my docxtemplater version. Now, while using image module I am facing below error:
"Cannot read properties of undefined (reading 'part'): TypeError: Cannot read properties of undefined (reading 'part')\n at ScopeManager._getValue (/usr/src/app/backend/node_modules/docxtemplater/js/scope-manager.js:48:36)\n at ScopeManager.getValue (/usr/src/app/backend/node_modules/docxtemplater/js/scope-manager.js:167:30)\n at ImageModule.render (/usr/src/app/backend/node_modules/open-docxtemplater-image-module/js/index.js:125:40)\n at moduleRender (/usr/src/app/backend/node_modules/docxtemplater/js/render.js:9:30)\n at /usr/src/app/backend/node_modules/docxtemplater/js/render.js:26:26\n at Array.map (<anonymous>)\n at render (/usr/src/app/backend/node_modules/docxtemplater/js/render.js:24:24)\n at XmlTemplater.render (/usr/src/app/backend/node_modules/docxtemplater/js/xml-templater.js:199:22)\n at /usr/src/app/backend/node_modules/docxtemplater/js/docxtemplater.js:425:21\n at Array.forEach (<anonymous>)\n at Docxtemplater.render (/usr/src/app/backend/node_modules/docxtemplater/js/docxtemplater.js:419:32)
Rest assured, all code for using image module is same, just that I have upgraded version of docxtemplater tp 3.32.3
Any help would be appreciated. Thanks.
Can support xlsx modules? How long will it take if it is developed to support xlsx modules?
As described in docxtemplater-image-module docs, the function in the option getSize
has 4 arguments, the fourth being context
. But this is not implemented in the free module yet it seems.
I need it to curb the image size to the table cell's width which contains it. Please let me know if this can be done. Thanks!!!
Hey!
I'm trying to get your browser example to work but I get the following error:
Uncaught (in promise) TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of type 'Node'.
Is this something you recognize? Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.