How to generate Array of items in html template for creating pdf in Node Js? -


i using html-pdf pdf creation on project. can generate details pdf. thing can not able create list of items in array in html(which used pdf conversion).
      since cannot use javascript array of items, unable it. if there tweak use javascript in html template,please post here. since array of items known, can use easily.
suppose if array length 3 . can use array[0].name ,array[1].name, array[2].name here don't know length of array consists of how many items. can please me here generate table of items generating dynamically.

you cannot use javascript in template, can use javascript on it.

the idea make parser :

  • read template
  • replace keywork (for example : <customtable arrayname="mycustomarray" fields="['name']" />) generated html array in node.js.
  • use template html-parser.

i write example of parser in vanillajs here : https://jsfiddle.net/rbuuzcre/5/


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -