pdf-creator-node icon indicating copy to clipboard operation
pdf-creator-node copied to clipboard

Does not have option for file name.

Open GitanjaliCS opened this issue 3 years ago • 1 comments

Hello

I am trying to add option filename but it takes full path as file name. But I want to add custom file name to pdf. How can I change?

Please help me. Its very urgent

GitanjaliCS avatar Aug 24 '21 12:08 GitanjaliCS

use path in create() first parameter.

var options = { format: "A4", orientation: "portrait" }
var document = {
    html: fs.readFileSync(__dirname + "/index.html", "utf8"),
    data: { title: "d" },
    path: folder_path + "xyz.pdf",
} 
pdf.create(document, options)

dipanjanpanja6 avatar Sep 24 '21 20:09 dipanjanpanja6