-
Notifications
You must be signed in to change notification settings - Fork 258
Open
Description
Hi, great job.
It will be practical to use a function for placing header and footer, programmatically, out of a file.
Like this :
let headerContent = function (pageNum, numPages) {
return "<h1>Header <span style='float:right'>" + pageNum + " / " + numPages + "</span></h1>"
}
let options = {
cssPath: this.rootPath + "/style.css",
header: {
height: "1cm",
contents: headerContent
}
}
fs.createReadStream(this.rootPath + "/in.md")
.pipe(markdownpdf(options))
.pipe(fs.createWriteStream(this.rootPath + "/out.pdf"))
It will be also useful for making custom header and footer be adding variables.
LokiMidgard
Metadata
Metadata
Assignees
Labels
No labels