All PDF templates of the notice designed by pagoPA
- Requirements
- Dependencies
- How to generate the PDF notice
- Breakdown of pages by number of instalments
- Python Script
- Related PDF templates
- Go to the
src
folder and runyarn
to install all the required packages - Based on your needs, you can run one of the following commands:
- Single instalment
- w/o Poste notice:
$ yarn generate-single-instalment
- w/ Poste notice:
$ yarn generate-single-instalment-poste
- w/o Poste notice:
- Multiple instalments: you can configure the number of instalments by changing the values contained in the
notice.instalments.items
array from thenotice-many-instalments.json
file- w/o Poste notice:
$ yarn generate-instalments
- w/ Poste notice:
$ yarn generate-instalments-poste
- w/o Poste notice:
- Many instalments (more than nine):
$ yarn generate-many-instalments
- Road traffic offence
- w/o Poste notice:
$ yarn generate-cds-infraction
- w/ Poste notice:
$ yarn generate-cds-infraction-poste
- for thermal printing:
$ yarn generate-cds-infraction-thermal
and$ yarn generate-cds-infraction-thermal-immediate-notification
- w/o Poste notice:
- All of the above:
$ yarn run-all-generate
- Single instalment
- If everything is okay, you will see a PDF file with the relative PDF template name in the
output_template
folder (starting from the root folder). For example, if you generate the most basic PDF template, you will see a PDF file namedTemplateSingleInstalment.pdf
in the same folder.
Total instalments² | First page³ | Second page | |
---|---|---|---|
№ cols | № cols | № rows | |
2 | 2 | - | - |
3 | 3 | - | - |
4 | 2 | 2 | 1 |
5 | 2 | 3 | 1 |
6 | 2 | 2 | 2 |
7 | 3 | 2 | 2 |
8 | 2 | 3 | 2 |
9 | 3 | 3 | 2 |
¹ getPaginationData
function in the paginator.js
helper file translates this breakdown into code
² For more than nine instalments please use the many instalments template
³ The first page always has a maximum of one row, as it contains all the main information
Total instalments³ | № instalments | ||
---|---|---|---|
2ⁿᵈ page | 3ʳᵈ page | 4ᵗʰ page | |
2 | 2 | - | - |
3 | 3 | - | - |
4 | 2 | 2 | - |
5 | 2 | 3 | - |
6 | 3 | 3 | - |
7 | 3 | 2 | 2 |
8 | 2 | 3 | 3 |
9 | 3 | 3 | 3 |
¹ getPaginationDataPoste
function in the paginator.js
helper file translates this breakdown into code
² The first page is omitted because it always shows only the single instalment. Other pages can show a maximum of three instalments per page, as payment slips take up space
³ There's no current template that supports the case with more than nine instalments
Note
The python script is used for Stampa Avvisi
The create_templates_zip.py
file is a Python script that creates a *.zip
file for each template, containing the template itself and its associated CSS and asset files. All zip files will be created in the ./output_zip
folder.
Note: In the ZIP archive, the hbs
template is renamed to template.html
.
Use this command, from the root folder:
$ python3 ./create_templates_zip.py
- Template for the PDF receipt:
pagopa-template-receipt-pdf