Version: 3
🔥 Gravity PDF v3 end of life was 2017-06-20 and this version is no longer supported. This legacy documentation is kept for reference only.
An Example of Images in Custom PDF Templates
Images
The plugin ships with a number of PDF templates showing off the features of mPDF. These can be found in your PDF_EXTENDED_TEMPLATES directory.Overview
Template Name:example-images03.php
Example URL: https://test.com/?gf_pdf=1&fid=3&lid=40&template=example-images03.php
The image example displays all supported image formats in mPDF. It also highlights the opacity
and rotate
CSS properties. Support image formats include GIF, PNG, JPG, WMF, SVG, BMP.
Images can be memory intensive. If you are concerned about performance you should always use the JPG format.
Float Support
There is partial support for floating images in mPDF however the following limitations apply:- You can only have one floated image left and one floated right per container.
- Unlike your browser (which will overflow the image out of the container), the containing HTML element is extended at the bottom if necessary to enclose the floated image.
- Floats are ignored if the image is too wide for the container, inside a table, or div page-break-inside: avoid is set.
View the mPDF documentation for more information about image support.