jsreport / jsreport-docx

jsreport recipe rendering word docx
MIT License
10 stars 3 forks source link

Enable docxImage to pull images from a URL during post-render #5

Closed sebastian-schlecht closed 4 years ago

sebastian-schlecht commented 4 years ago

Enable a second parameter to docxImage called url which can be used as an alternative to src. In case url is set, images are fetched during post-render and then rendered into the document. Files are fetched in parallel. This allows to only download those images which are actually used within the document.

Addresses #3.

sebastian-schlecht commented 4 years ago

Somehow ./node_modules/standard --fix doesn't fix all the formatting issues, hence the large diff.

sebastian-schlecht commented 4 years ago

Thanks for the comments & feedback. Will probably implement the changes tomorrow.

sebastian-schlecht commented 4 years ago

@pofider I implemented your feedback on the PR. I can fix the remaining formatting diff if you want, but I would need a style-config for that.