Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docxtemplater-cli-open-image-module

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docxtemplater-cli-open-image-module

CLI for Docxtemplater including optional support of OpenSource ImageModule

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

docxtemplater CLI (with Open Source Image Module)

This fork of docxtemplater CLI includes the support for open-docxtemplater-image-module.

Installation

The package below includes a copy of docxtemplater and open-docxtemplater-image-module.

npm install -g docxtemplater-cli-open-image-module

Try it out

Browse to folder 'examples' and run the following in your console

docxtemplater input.pptx data.json output.pptx

data.json file structure

This is a simple JSON file. Assuming we are working on the template 'input.pptx' provided with this package in 'examples' folder, we write below JSON to replace tags in the template by their respective value.

{
    "first_name": "John",
    "last_name": "Doe",
    "description": "He is awesome",
    "phone": "+4412345678",
    "picture": "johndoe.png"
}

As you can see we have included a picture of John Doe (johndoe.png). For this picture to be correctly rendered in the output, we must explicitly activate the Open Source Image Module open-docxtemplater-image-module. Note that all images must be under the directory 'imageDir'.

{
    "first_name": "John",
    "last_name": "Doe",
    "description": "He is awesome",
    "phone": "+4412345678",
    "picture": "johndoe.png",
    "config": {
      "modules": ["open-docxtemplater-image-module"],
      "imageDir": "."
    }
}

Template tags

More on how to write your templates in docxtemplater documentation.

FAQs

Package last updated on 18 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc