N
N
Nikita2020-12-04 20:12:13
JavaScript
Nikita, 2020-12-04 20:12:13

Ejs how to determine if a table fits into a document and if it doesn't, add another one?

I have an ejs document. Columns highlighted in blue can have a different number of rows and there can be any number of them.
5fca6cb2e4ed1016861146.png

I am generating pdf from this document using npm html-pdf

const pdf = require('html-pdf')
const ejs = require('ejs')

pdf.create(ejs.render(тут_ejs_строка), {/* опции html-pdf */}).toFile(path, function(err, res) {
        if (err) return console.log(err)
})


How to determine that the table does not fit into the document and create another one, and then another one, etc.?

I would be grateful for any help, naturally I do not ask for a ready-made solution

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question