A simple server that accepts json data and generates a PDF using QuestPDF.
-
Clone this repo to your local machine using
-
Make sure you have .NET 9+ installed
-
Add
QuestPDF:LicenseType
to your environment orappsettings.json
file. The value should be eitherCommunity
,Professional
orEnterprise
. -
Run the server using
dotnet run
ordotnet watch run
insrc/api
docker run -p 5000:5000 -e QuestPDF:LicenseType=Community morabaasoftwaresolutions/questpdfserver:latest
Docs are available at here
To see the available elements and their properties, check here
{
"page": {
"backgroundColor": "#ffffff",
"margin": "4",
"marginUnit": "millimetre"
},
"title": {
"$type": "text",
"text": "Hey!",
"fontWeight": "bold",
"fontSize": 36
},
"content": {
"$type": "column",
"elements": [
{
"$type": "row",
"elements": [
{
"$type": "text",
"text": "id",
"fontWeight": "bold",
"rowItemConfig": {
"type": "Constant",
"size": 64
}
},
{
"$type": "text",
"text": "image",
"fontWeight": "bold",
"rowItemConfig": {
"type": "Constant",
"size": 100
}
},
]
}
]
}
}
QuestPDF Server is licensed under the MIT License.