elliotblackburn / mdpdf

Markdown to PDF command line app with support for stylesheets
https://npmjs.com/package/mdpdf
Apache License 2.0
717 stars 47 forks source link

Unwanted default footers/headers automatically added in CLI only #161

Open hxlnt opened 1 year ago

hxlnt commented 1 year ago

In the CLI, it seems that Puppeteer is adding its own headers or footers depending on what flags are passed in. image This may be related to #160:

CLI command Result
mdpdf topic.md ✅ No footers added
mdpdf topic.md --header=header.html --h-height=40px ❌ Custom header is not added. ❌ Unwanted footer is added: {File path} {Page count}
mdpdf topic.md --footer=footer.html --f-height=40px ❌ Custom footer is not added. ❌ Unwanted header is added: {Date} {Time}
mdpdf topic.md --footer=footer.html --f-height=40px --header=header.html --h-height=40px ❌ Custom header is not added. ❌ Custom footer is not added.

Notably, this does not occur when calling from the Node API.