Introduction

Last updated: March 7th 2020

Creating PDF is easy and fast now with Super PDF. Plug, Twig and play. Super PDF is backed with DomPDF library and gives you full power to covert your twig templates into PDF. You can pass external CSS and HTML 4.0 attributes working with it. All the functionality DomPDF gives can be accessible easily in Super PDF.

You can create in template PDF, or can pass another template to generate PDF. You can save the PDF in cache directory and get the URL of PDF that you can use to download/show PDF.

Features

  • Handles most CSS 2.1 and a few CSS3 properties, including @import, @media & @page rules
  • Supports most presentational HTML 4.0 attributes
  • Supports external stylesheets, either local or through http/ftp (via fopen-wrappers)
  • Supports complex tables, including row & column spans, separate & collapsed border models, individual cell styling
  • Image support (gif, png (8, 24 and 32 bit with alpha channel), bmp & jpeg)
  • No dependencies on external PDF libraries, thanks to the R&OS PDF class
  • Inline PHP support
  • Basic SVG support

Requirements

  • PHP version 7.1 or higher
  • Craft CMS 3.0 or higher
  • DOM extension
  • MBString extension
  • php-font-lib
  • php-svg-lib


Note that some required dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).