Hi there, I'm looking to get a PDF generated from the HTML of my website which uses bootstrap and is responsive to displays size. I'm finding that the node-pdf-creator always renders it in it's mobile mode. Is there any options / suggestions on how to force the creator render the HTML + CSS in desktop mode?
I have tried setting the width and height very wide, and using landscape mode to no avail. Any help would be appreciated.
Here is my generation script, without templating data yet:
import * as fs from "fs";
// Read HTML Template
let html = fs.readFileSync('template.html', 'utf8')
let options = {
orientation: "landscape",
height: "20in",
width: "40in",
}
let document = {
html: html,
data: {
inspection: [],
photos: []
},
path: "./output.pdf"
};
pdf.create(document, options)
.then(res => {
console.log(res)
})
.catch(error => {
console.error(error)
});
Hi there, I'm looking to get a PDF generated from the HTML of my website which uses bootstrap and is responsive to displays size. I'm finding that the node-pdf-creator always renders it in it's mobile mode. Is there any options / suggestions on how to force the creator render the HTML + CSS in desktop mode?
I have tried setting the width and height very wide, and using landscape mode to no avail. Any help would be appreciated.
Here is my generation script, without templating data yet: