PDF Designer Add-On
Visual drag & drop PDF layout editor for quote exports.
This add-on is:
- Composer package:
mageb2b/b2b-quote-pdfdesigner - Magento module:
MageB2B_B2BQuotePdfDesigner
What You Get
- Visual layout editor in the Magento admin
- Layout storage (DB) + repository
- Variable system (built-in + extendable via providers)
- Rendering pipeline (PDF renderer + element renderers)
Screenshot placeholder: custom layout tile in the selector
File:./_screenshots/pdf-custom-layout.png
Installation
1) Require package
composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/b2b-quote-pdfdesigner:* 2) Enable module + run setup
php bin/magento module:enable MageB2B_B2BQuotePdfDesigner php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy php bin/magento cache:flushWhere To Configure It (Admin)
- PDF layout selector: Stores → Configuration → MageB2B → B2B Quote → PDF Settings
- config key:
b2bquote/pdf/pdf_layout
- config key:
See:
Screenshot placeholder: PDF designer UI / layout editor
File:./_screenshots/pdf-designer-ui.png
Variables
Variables are resolved during PDF generation.
Template Syntax
Variables use {{variable_code}} with optional formatting:
{{my_variable}} // Raw value {{my_variable|uppercase}} // UPPERCASE {{my_variable|date:Y-m-d}} // Custom date format {{my_variable|currency}} // Currency format {{my_variable|truncate:50}} // Max 50 charsVariable Types
| Type | Description |
|---|---|
string | Plain text |
number | Numeric value |
currency | Money amount (formatted) |
date | Date/time (formatted) |
Adding Custom Variables (Developer)
Third-party modules can add custom variables to the designer UI by registering a variable provider.
1) Create a Variable Provider
'resolved value', default => '' }; } }2) Register the Provider (DI)
- Vendor\Module\Model\Variable\Provider\CustomProvider
Context Data
The $context array contains:
quote(B2B quote model)store(store model)page_number(current page number)page_count(total pages)
Troubleshooting
UI Not Loading / Missing JS
php bin/magento setup:static-content:deploy php bin/magento cache:flushSee also:
