PDF-Renderer
Convert PDF Files to images before upload in WP Media Library.
★ 4stars
7release downloads
1composer installs
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/mcguffin/pdf-renderer/releases/download/0.2.0/pdf-renderer.zipAlso on Packagist as mcguffin/pdf-renderer:
composer require mcguffin/pdf-rendererDeclares an update source (https://github.com/mcguffin/pdf-renderer/raw/master/.wp-release-info.json), so updates arrive through the plugin's own updater.
From the readme
PDF Renderer
Convert PDF Files to Images in your browser when dropped into the media library.
Includes Mozilla pdf.js for browser pdf rendering.
PDF-Contents: cc-by Creative Commons
Installation
Production
- Head over to releases
- Download 'pdf-renderer.zip'
- Upload and activate it like any other WordPress plugin
- AutoUpdate will run as long as the plugin is active
Using composer
For Development
- cd into your plugin directory
- $ git clone git@github.com:mcguffin/pdf-renderer.git
- $ cd pdf-renderer
- $ npm install
- $ npm run dev
Plugin API
Filter pdfrendererimagewidth
Use this to overrule width of generated images. Uses the largest image width known to WP by default. (e.g. the Large size from Settings Media).
Example:
Filter pdfrendererimagetype
Type of generated images. Possible values are image/png and image/jpeg. default is image/png.
To override the JPEG-Quality you can use the WP Core filter jpegquality. The string pdfrenderer is passed as a second argument to applyfilters().
Example:
Development
npm scripts:
- npm run audit: Run phpcs audit
- npm run build: Build css and js from sources
- npm run dev: Watch css and js source dirs
- npm
Read the full README on GitHub →