Closed time4Wiley closed 9 months ago
Would be great if the cached one can have page number.
There is probably a setting in the generation script somewhere, PRs welcome.
in .github/workflows/generate_release.yml
, it references the following code:
./generate_pdf.sh cheats.rs/rust_cheat_sheet.pdf
Needs to look into generate_pdf.sh
it uses google-chrome as stated in the actual code snippet producing the pdf in docker/generate_pdf.sh
google-chrome --headless --disable-gpu --print-to-pdf=$output --print-to-pdf-no-header http://localhost:1111#_print
Found another docker image docker-html-to-pdf that references a npm package chrome-headless-render-pdf supporting the following options:
--header-template HTML template for the header. Inject variables using the classes "date", "title", "url", "pageNumber" or "totalPages" --footerTemplate HTML template for the footer. Inject variables using the classes "date", "title", "url", "pageNumber" or "totalPages"
Seems to work now.
rust_cheat_sheet-numbered.pdf
Attached a numbered one by manually uploading to service from https://smallpdf.com/add-page-numbers-to-pdf