HollowMan6 / mdbook-pdf

A backend for mdBook written in Rust for generating PDF based on headless chrome and Chrome DevTools Protocol. (用 Rust 编写的 mdBook 后端,基于headless chrome和Chrome开发工具协议生成PDF)
https://crates.io/crates/mdbook-pdf
GNU General Public License v3.0
150 stars 18 forks source link

Is there a way to put current date (and maybe time) in the footers for the generated PDFs? #7

Closed GeoffMurray closed 1 year ago

GeoffMurray commented 1 year ago

It would be helpful so I could try and make the headers and footers more like our regular ones.

HollowMan6 commented 1 year ago

You can make it show the datetime by assigning the class date, like "\\", to the header-template or footer-template https://github.com/HollowMan6/mdbook-pdf/blob/main/test_doc/book.toml#L34

Check https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF for more