I am creating a pdf file using html-pdf librarby in node js from an html file.
My code is
const createSettlementPDFFile = function (htmlString, fileName) {
return new Promise((resolve, reject) => {
let filePath = '/tmp/' + fileName;
pdf.create(htmlString, {format: 'A6', timeout: 600000})
.toFile(filePath,function (err, data) {
if (err) {
logger.error('Error while creating the pdf file ::-> ', err.stack);
return reject(err);
} else {
return resolve(data);
}
});
});
};
Is there any option where we can convert it into a single page and increase the width of the pdf page.

https://www.npmjs.com/package/html-pdf?activeTab=readme
I guess you are using this lib.
{format: 'A6', timeout: 600000}this makes page size to A6.
so page is sperated.
uses like this
I don't know how big you can set, but you can choose the appropriate size.
if value is too big, there will be empty space at the end of page.
Therefore, it is not a solution that can be applied to all sizes of documents.