The file path where you want to store the pdf file is required and need to add into the application.properties file .
To test this application you need any HTTP client like postman, thunder client, fast API etc.
Make the request as shown below:
POST
-
http://localhost:8080/api/generatepdf
Add JSON request body in following format:
{
"seller": "XYZ Pvt. Ltd.",
"sellerGstin": "29AABBCCDD121ZD",
"sellerAddress": "New Delhi, India",
"buyer": "Vedant Computers",
"buyerGstin": "29AABBCCDD131ZD",
"buyerAddress": "New Delhi, India",
"items": [
{
"name": "Product 1",
"quantity": "12 Nos",
"rate": 123.00,
"amount": 1476.00
}
]
}