Example tasks
Turn a PDF into an image using MuPDF
This example will show you how to turn a PDF into an image using MuPDF and Trigger.dev.
Overview
This example demonstrates how to use Trigger.dev to turn a PDF into a series of images using MuPDF and upload them to Cloudflare R2.
Update your build configuration
To use this example, add these build settings below to your trigger.config.ts
file. They ensure that the mutool
and curl
packages are installed when you deploy your task. You can learn more about this and see more build settings here.
trigger.config.ts
Task code
trigger/pdfToImage.ts
Testing your task
To test this task in the dashboard, you can use the following payload:
Local development
To test this example task locally, be sure to install any packages from the build extensions you added to your trigger.config.ts
file to your local machine. In this case, you need to install .
Was this page helpful?