Skip to content

A Spring Boot Application with REST API to generate PDF using Thymleaf template. Thymeleaf is a modern server-side Java template engine for web and standalone environments. In the context of Spring Boot.

Notifications You must be signed in to change notification settings

Palchetan07/pdfgenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic PDF Generation ft. SpringBoot

A Spring Boot Application with REST API to generate PDF using Thymleaf template.
Thymeleaf is a modern server-side Java template engine for web and standalone environments. In the context of Spring Boot, Thymeleaf is commonly used as the default template engine for generating dynamic HTML content in web applicationsand manipulate PDF documents.

Features

REST API to accept data and generate PDF documents. Storage of generated PDFs on local storage for future retrieval.

Requirements

Java Development Kit (JDK) version 8 or higher Maven Postman or Swagger for testing

Request

POST /generate/document

POST 'http://localhost:8080//generate/document'
Content-Type: application/json' template: invoice_template'

Body

{
"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
}

Response

image

image

PDF Content

image

About

A Spring Boot Application with REST API to generate PDF using Thymleaf template. Thymeleaf is a modern server-side Java template engine for web and standalone environments. In the context of Spring Boot.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published