Как преобразовать шаблон ejs/html в pdf в nodejs, используя jsreports-core

Как преобразовать html/ejs шаблон в pdf в nodejs, используя jsreports-core . Я могу преобразовать html-тег или любой текст в pdf, но как преобразовать html-файл в pdf. Как это (content (h1>Hello/h1),).. how to change this to readfile and convert it into pdf..

var fs = require('fs');
const jsreport = require('jsreport-core')()
jsreport.init().then(() => {
var rep =  jsreport.render({
template: {
    content: ' <h1>Hello</h1>',
    engine: 'handlebars',
    recipe: 'chrome-pdf',

0 ответов

Другие вопросы по тегам