This repo contains the pdf receipt templates used by pagoPA
- Node JS (👀
.node-version
file), optional see nvm - yarn
- Handlebars CLI to render handlebars templates
- Puppeteer to generates a PDF of the page with the print CSS media type
To edit them, you can choose among these following options:
To generate the HTML output you need to install dependecies typing
Under receipt/success/pdf
folder, on terminal typing :
yarn install
if all right you'll see something like that
success Saved lockfile.
✨ Done in 21.71s.
then typing :
yarn generate-complete
or
yarn generate-partial
if all right you'll see something like that
Wrote /pagopa-template-receipt-pdf/receipt/success/pdf/template.html from /pagopa-template-receipt-pdf/receipt/success/pdf/template.hbs
✨ Done in 5.62s.
and now, after typing ls -lrt
command u'll see a PDF file naming pagopa-receipt-<UUID>.pdf
Templates are compatible with the following clients:
- Apple Mail 13+ (dark mode included)
- Gmail Web app
- OL Office 365 (dark mode included, partially supported on Windows)
- Outlook 2013, 2016, 2019, 2021 (dark mode included, partially supported on Windows)
- Windows 10 Mail (dark mode partially supported)
- Windows 11 Mail
- Gmail App (Android 6+, dark mode partially supported)
- Gmail App (iOS 13.1+, dark mode partially supported)
- iPad (iOS 13.1+)
- iPhone (iOS 13.1+)
- AOL Mail
- Outlook.com Mail (dark mode partially supported)
- Yahoo! Mail