Download the PHP package mcguffin/pdf-renderer without Composer
On this page you can find all versions of the php package mcguffin/pdf-renderer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mcguffin/pdf-renderer
More information about mcguffin/pdf-renderer
Files in mcguffin/pdf-renderer
Package pdf-renderer
Short Description WordPress plugin to convert PDFs to Images before uploading them
License GPL-3.0-or-later
Informations about the package pdf-renderer
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 [email protected]:mcguffin/pdf-renderer.git
- $
cd pdf-renderer
- $
npm install
- $
npm run dev
Plugin API
Filter pdf_renderer_image_width
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 pdf_renderer_image_type
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 jpeg_quality
. The string pdf_renderer
is passed as a second argument to apply_filters()
.
Example:
Development
npm scripts:
npm run audit
: Run phpcs auditnpm run build
: Build css and js from sourcesnpm run dev
: Watch css and js source dirsnpm run dashicons
: Generate dashicons scss variables from sourcenpm run i18n
: generate.pot
filenpm run rollback
: remove last commit (local and remote – use with caution!)npm run test
: run unit tests against PHP 7.4 and 8.3npm run test:edge
: run unit tests against PHP 8.3 onlynpm run test:legacy
: run unit tests against PHP 7.4 only
Testing
Unit Tests
Unit tests are run in wordpress/env, which is basically a docker container. Docker Desktop is required.
Unit tests are run against PHP 7.4 (legacy) and 8.3 (edge).
Run them all:
Run edge tests only:
Configure edge test and run something in wp-cli in the docker container:
All versions of pdf-renderer with dependencies
mcguffin/wp-skeleton-plugin Version dev-main
php Version >=7.4.33|^8