@bicou/directus-extension-pdf-image
v0.0.8
Published
Directus extension to create a screenshot image for each uploaded PDF document
Maintainers
Readme
Directus Extension: PDF Image
A Directus extension to create a screenshot image for each uploaded PDF document.
Description
This extension uses the pdf-to-img library to generate an image from uploaded PDF files.
It is designed to work seamlessly with Directus, a headless CMS.
Features
- Generate image from the first page from uploaded PDF files
- Store the generated image in PNG format in the Directus media library
Installation
To install this extension, add the package to your directus project by running the following command:
pnpm install @bicou/directus-extension-pdf-imageDependencies
The pdf-to-img package depends on the canvas library, which in turn requires a cairo installation.
Due to this dependency, this extension will not function in a Directus Marketplace installation.
If you encounter installation or usage issues, please verify that canvas is correctly installed or consult the canvas documentation for further assistance.
Usage
To use this extension, simply upload a PDF file to your Directus instance. The extension will automatically generate an image from the PDF file.
License
This extension is released under the MIT License.
