typesetsh / magento2-extension
Magento2 typeset.sh 扩展
1.4.0
2020-07-19 17:37 UTC
Requires
- magento/framework: ^102.0
- magento/module-directory: ^100.0
- magento/module-sales: ^102.0
- magento/module-store: ^101.0
- typesetsh/typesetsh: ^0.9
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.14.0
- magento/magento-coding-standard: ^5
- phan/phan: dev-master
- phpunit/phpunit: ^8.5
README
此 Magento 2 扩展提供了使用 typeset.sh 引擎的替代 PDF 渲染器。
PDF 使用与网站渲染相同的方式(使用块和 phtml 模板文件)由商店主题提供的 html 生成。如果你熟悉 Magento2 布局和主题结构,这使得调整 PDF 变得简单。
此扩展仅替换 Magento\Sales\Model\Order\Pdf\*
类。
然后您可以直接在您的主题中进行任何 PDF 调整。
示例
PDF 的调整可以直接在您的主题文件夹中完成。这里是一个 PDF 输出文件示例。
通过 Composer 安装
获取对您的 typeset.sh 仓库的访问权限。请参阅 typeset.sh 文档。
composer require typesetsh/magento2-extension php bin/magento module:enable Typesetsh_Pdf php bin/magento setup:upgrade
许可证
此扩展受 MIT 许可证 的约束。
但是,它需要一个 typeset.sh 版本才能运行。