- Create PDFs from HTML templates
- Create Images from HTML
- Variables for dynamic content
- API for integration into other systems
- Custom css per template
- Add new fonts
- Support Jinja2
docker run -d -p 8000:8000 \
-e "DB_NAME=pdfactory" \
-e "DB_PORT=5432" \
-e "DB_USER=postgres" \
-e "DB_PASS=password" \
-e "DB_HOST=localhost" \
-e "[email protected]" \
-e "ADMIN_PASSWORD=admin" \
-e "DOMAIN=https://pdfactory.com" \
--name pdfactory wildsonc/pdfactory
User: [email protected] Password: admin
curl --location --request POST 'http://localhost:8000/api/pdf' \
--header 'Authorization: Bearer 44f976aafa9277af948f54ad43c37cc813e6facd' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_id": "2",
"json": {
"client": "John Due",
"provider": "Company",
"amount": "$ 1000,00",
"period": "12 months"
}
}'
When any of these parameters are sent, the response will be in json.
- output_html:
boolean
- output_base64:
boolean
- upload:
boolean
To use the upload it is necessary to configure the storage
curl --location --request POST 'http://localhost:8000/api/image' \
--header 'Authorization: Bearer 44f976aafa9277af948f54ad43c37cc813e6facd' \
--header 'Content-Type: application/json' \
--data-raw '{
"html": "<html>...</html>",
"upload": true # optional
}'
When any of these parameters are sent, the response will be in json.
- upload:
boolean
To use the upload it is necessary to configure the storage
Additional environments
S3_ENDPOINT=
S3_ACCESS_KEY=
S3_SECRET_KEY=
S3_BUCKET=
curl --location --request POST 'http://localhost:8000/api/pdf' \
--header 'Authorization: Bearer 44f976aafa9277af948f54ad43c37cc813e6facd' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_id": "2",
"upload": true,
"json": {
"client": "John Due",
"provider": "Company",
"amount": "$ 1000,00",
"period": "12 months"
}
}'