learning-project-01 / bookstore-app

3 stars 2 forks source link

generate pdf invoice for place order #97

Open rkpatra201 opened 8 months ago

rkpatra201 commented 8 months ago

Write a main method class to show this task only.

First place order. it will generate a json file in your user home. Below is one of the json file. Convert it to object again using ObjectMapper (see how we generated this file using ObjectMapper, similarly we can convert it to object again) 404051796913300.json

Once you have object for above file then use that object to generate pdf invoice using iText library.

iText jar is available as maven dependency. Below are some references to work with iText.

https://howtodoinjava.com/java/library/read-generate-pdf-java-itext/ https://www.vogella.com/tutorials/JavaPDF/article.html