Questions tagged [docxtemplater]

docxtemplater is a Javascript software library that allows to do some templating on the docx and pptx format. https://github.com/open-xml-templating/docxtemplater

docxtemplater can be used to replace placeholders in a word document.

With following document :

Hello {name} !

and following data as JSON :

{ "name" : "John" }

After templating, the document will contain :

Hello John

docxtemplater supports simple replacing, but also loops, conditions and raw xml insertion

56 questions
0
votes
1 answer

Docxtemplater - RangeError: Invalid string length

I'm turning a very large txt file(~40MB) into docx but it seems that the string is too large for Node.js to handle. Is there any fix for it? Or another solution? My code: import fs from 'fs'; import path from 'path'; import Docxtemplater from…
goEval
  • 1
  • 3
0
votes
1 answer

How to fix the "Multi error" for the docxtemplater?

I am using the docxtemplater library to generate a word file. When I use more than 1 tag in the same line, it prompts the following error: "error":{"name":"TemplateError","message":"Multi error","stack":"Error: Multi error\n at new…
The KNVB
  • 3,588
  • 3
  • 29
  • 54
0
votes
1 answer

Firebase Storage + docxtemplater in nodejs

I am having trouble loading a firebase storage document in node js (preferably in binary) so that I can generate a docxtemplater document on it. I'm quite new to docxtemplater and would really like to use it for my webapp Is this something that can…
0
votes
1 answer

Nodejs concurrent requests overridden variables

I have a method in nodejs used to generate a document. If I have two simultaneous requests, the content of one document is the same as the second one (the variable "contents" below). If for example the source.content retrieved by the first request…
0
votes
1 answer

Docxtemplater variable data keys

I need to generate a docx from a data set in which there are variable tag names: { "month": "January", "year": "2020", "workers": { "John": [ { "days": "12", "shop": "Shop #1" …
Seether
  • 1,524
  • 1
  • 14
  • 28
0
votes
1 answer

How to remove a blank page from generated docx through "docxtemplater"

Description: Using "docxtemplateer" I have generated a ".docx" in my angularjs app and could see all the data populated. But there is a page which will get render based on a specific condition. And if that condition fails then it's generating a…
Vikash Choudhary
  • 1,439
  • 12
  • 9
0
votes
1 answer

Troubles processing .docx template from rails to Angular

I am new on angular 4, I need to send a .docx template file from Angular(frontend) to rails(backend), and then when the user requires download the .docx template and processing using docxtemplater Here is my code to send the file from Angular to…
Tico90
  • 3
  • 3
0
votes
1 answer

Docxtemplater array only entering last value

Hello I have a form a user fills out with some dynamic fields that the user can add or remove. On completion of this form a word document is being created using docxtemplater. I am creating an array so that I can loop through the multiple items that…
0
votes
1 answer

Refactoring docxtemplater from server, the req json object stops be accessed in doc.setData()

I am trying to refactor docxtemplater code out of my server file in node. The req.body json object works fine there, and even can be console.logged inside the doc.setData() method. However when I try to run the server I am getting this error:…
John
  • 1,075
  • 1
  • 7
  • 13
0
votes
0 answers

How to make docxtemplater work with angular-fullstack?

i am fairly new to yo generator angular-fullstack. The problem i am facing is that i want to use the docxtemplater with it. I did npm install docxtemplater --save and import docxtemplater from 'docxtemplater'; ... …
-1
votes
1 answer

convert special characters in javascript file

I am using DocXTemplater for exporting table to word document In the js file, there is a module with special characters, and CRM is not allowing me to create a file with these special characters. I tried removing the variables with special…
1 2 3
4