AFCA mPDF Loader
Load mPDF globally on WordPress for snippets and other plugins.
by André Amorim · github.com/andrefcamorim/afca-mpdf-loader · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/andrefcamorim/afca-mpdf-loader/archive/refs/heads/main.zipFrom the readme
AFCA mPDF Loader
Load mPDF globally for WordPress snippets, themes, or other plugins.
- Activate AFCA mPDF Loader plugin once.
- Use the afcampdf() function anywhere in WordPress to get a ready mPDF instance.
Installation
1. Using the ZIP (recommended):
- Go to Plugins → Add New → Upload Plugin.
- Upload afca-mpdf-loader.zip.
- Activate it.
2. For development / updating dependencies:
Run this in the plugin root directory to install or update mPDF.
(This step is only needed if you are modifying the plugin or updating dependencies.)
Usage Example
Notes
- $mpdf = afcampdf($configarray) returns a fully configured mPDF instance.
- You can use it for generating PDFs in snippets, plugins, or theme templates.
- If afcampdf() already exists, a debug notice will be logged (requires WPDEBUG = true).