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.
Note that some required dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).