📜  puppeeter pdf 桌面 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:55.184000             🧑  作者: Mango

代码示例1
// add this in your style tag / css file and add styles u wanna change
@page {
  size: A4;
  margin: 0;
}
@media print {
  .col {
      width: 25% !important;
  }
}

// puppeteer config
await page.pdf({
    ...options,
    printBackground: true,
});