alvarcarto / alvarcarto/url-to-pdf-api

Footer and Header Template

オープン
#200 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
HTML
スター
7.1k
フォーク
779
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello there,
So i'm trying to add header and footer to my document using the options headerTemplate and footerTemplate from page.pdf().

Here's my headerTemplate:
```

#iqwut { box-sizing: border-box; height: 100px; width: 100%; font-size: 18px; margin: 0 30px; }#iybdk { box-sizing: border-box; display: table; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; width: 100%; }#ipplj { box-sizing: border-box; width: 8%; display: table-cell; height: 75px; }#i60rj { box-sizing: border-box; padding: 10px; background-color: red; color: yellow; }#ivk0e { box-sizing: border-box; width: 8%; display: table-cell; height: 75px; }

SOME TEXT FOR TEST

```

When i execute it (https://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro), the render is what i'm expecting.

Though when i passed this string to headerTemplate, i have no background-color. And this is a simple case when my goal is to have nested div with nested styles.

I am facing a dead-end or is there a way to display a div with nested style correctly ?

Config:
"puppeteer": "^20.3.0"

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。