PDF Engines
The PDF Engines module gathers all engines that can manipulate PDF files.
It calls each engine until one successfully handles a task.
Properties
--pdfengines-engines strings Set the PDF engines and their order - all by default
--pdfengines-disable-routes bool Disable the routes
Routes
Each route accepts multipart/form-data
requests.
Merge
POST /forms/pdfengines/merge
This route accepts PDF files and merges them alphabetically.
For instance:
curl \
--request POST 'http://localhost:3000/forms/pdfengines/merge' \
--form 'files=@"/path/to/pdf1.pdf"' \
--form 'files=@"/path/to/pdf2.pdf"' \
--form 'files=@"/path/to/pdf3.pdf"' \
--form 'files=@"/path/to/pdf4.pdf"' \
-o my.pdf
- PDF Format
pdfFormat string The PDF format of the resulting PDF
For instance:
curl \
--request POST 'http://localhost:3000/forms/pdfengines/merge' \
--form 'files=@"/path/to/pdf1.pdf"' \
--form 'files=@"/path/to/pdf2.pdf"' \
--form 'files=@"/path/to/pdf3.pdf"' \
--form 'files=@"/path/to/pdf4.pdf"' \
--form 'pdfFormat="PDF/A-1a"' \
-o my.pdf
After a merge, the PDF engines will convert the resulting PDF to a specific format.
Check the available PDF formats:
Convert
POST /forms/pdfengines/convert
This route accepts PDF files and a form field pdfFormat
for converting them into the specified format.
For instance:
curl \
--request POST 'http://localhost:3000/forms/pdfengines/convert' \
--form 'files=@"/path/to/pdf1.pdf"' \
--form 'files=@"/path/to/pdf2.pdf"' \
--form 'files=@"/path/to/pdf3.pdf"' \
--form 'files=@"/path/to/pdf4.pdf"' \
--form 'pdfFormat="PDF/A-1a"' \
-o my.zip
Engines
PDFtk
- Module name:
pdftk
- ✅ Merge
- ❌ Convert
This engine uses PDFtk - give it a star ⭐️
PDFcpu
- Module name:
pdfcpu
- ✅ Merge
- ❌ Convert
This engine uses PDFcpu - give it a star ⭐️
QPDF
- Module name:
qpdf
- ✅ Merge
- ❌ Convert
This engine uses QPDF - give it a star ⭐️
UNO
- Module name:
uno-pdfengine
- ❌ Merge
- ✅ Convert (formats:
PDF/A-1a
,PDF/A-2b
,PDF/A-3b
)
This engine uses unoconv - give it a star ⭐️
Metrics
The PDF Engines module exposes the following metrics:
{namespace}_pdftk_active_instances_count
- current number of active PDFtk instances.{namespace}_qpdf_active_instances_count
- current number of active QPDF instances.{namespace}_unoconv_active_instances_count
- current number of active unoconv instances.{namespace}_libreoffice_listener_active_instances_count
- current number of active LibreOffice listener instances.{namespace}_libreoffice_listener_queue_length
- current number of processes in the LibreOffice listener queue.
The metrics unoconv_listener_active_instances_count
and unoconv_listener_queue_length
are deprecated in favor of libreoffice_listener_active_instances_count
and libreoffice_listener_queue_length
.
See Prometheus for more details.