79605060

Date: 2025-05-03 20:01:04
Score: 1
Natty:
Report link

You just need to add one line "preferCSSPageSize: false,". It will make your code as

await page.pdf({ path: FILENAME,

format: 'A4',
margin: {
    top: "0px",
    right: "0px",
    bottom: "0px",
    left: "0px"
},
printBackground: true // required for photos otherwise blank
preferCSSPageSize: false,

});

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ramesh Karunakaran