Skip to main content
Version: 7.x

PDF Engines

The PDF Engines module gathers all engines that can manipulate PDF files.

info

It calls each engine until one successfully handles a task.

Properties#

--pdfengines-engines        strings  Set the PDF engines - 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
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
info

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 ⭐️

unoconv#

  • Module name: unoconv-pdfengine
  • ❌ Merge
  • ✅ Convert (format PDF/A-1a)

This engine uses unoconv - give it a star ⭐️