Hi everyone,
I'd like to share a module I've been working on: WirePDF — a PDF generation module with full UTF-8 and Cyrillic support.
What it does
Adds a toPdf() hook to any page, so generating a PDF is as simple as:
$page->toPdf(['filename' => 'document.pdf']);
You can also pass custom HTML, use a dedicated template file, or save the PDF directly to disk.
Key features
Two engines: mPDF (recommended) and Dompdf
Full field support: all native PW fields + ProFields (Table, Repeater, RepeaterMatrix, Combo)
Typography: 14 fonts including DejaVu Sans for multilingual/Cyrillic content
Headers & footers with {PAGENO}, {nbpg}, {DATE}, {sitename} variables
Watermarks, password protection, configurable margins and paper sizes
Logging via ProcessWire's built-in log system (Setup > Logs > wirepdf)
Installation
cd /site/modules
git clone https://github.com/mxmsmnv/WirePDF.git
cd WirePDF
composer install
Then install via Modules > Refresh in the admin.
GitHub: https://github.com/mxmsmnv/WirePDF
Feedback and bug reports welcome!