Spring boot application that generates pdf files starting from a set of xslt templates and a collection of parameters specifically formatted.
Rest API that exposes method to perform PDF generation given its content. This application only generates PDF associated with product tracking workflow relative to Italian land production of small enterprises.
Currently are handled only 6 types of documents that are the following:
- Tracciabilità piante e semi
- Tracciabilità materie prime
- Checlist materie prime
- Tracciabilità prodotto finito (lavorazione)
- Controllo pulizie
- Tracciabilità prodotto finito
- Filename associated with the required PDF (ChecklistMateriePrime.pdf, ControlloPulizie.pdf, LavorazioneProdottoFinito.pdf, TracciabilitaMateriePrime.pdf, TracciabilitaPianteESemi.pdf, TracciabilitaProdottoFinito.pdf).
- Information about the footer, composed of two fields: title and subtitle (can be left empty).
- A list of items containing all custom text to inject in the PDF. This can vary from template to template.
- A field productInfo that contains generic properties. Only necessary for specific templates.
Following is a snipped example that can be executed with a REST Client.
POST https://foptility/transform/json
Content-Type: application/json
{
"parameters": {
"filename": "TracciabilitaMateriePrime.pdf",
"footer": {
"title": "Enterprise Name",
"subtitle": "Enterprise subtitle"
},
"items": {
"plants": "Tomatoes",
"origin": "Autoproduzione',
"lot": "123ABC",
"isCompliant": true,
"kg": "12",
}
}
}
The application uses Java11+ and Maven 3.6+.