inspiredminds/contao-pdf-generation
Composer 安装命令:
composer require inspiredminds/contao-pdf-generation
包简介
Allows you to create a PDF for a complete Contao page.
README 文档
README
Contao PDF Generation
This allows generating PDF files from regular Contao pages via the mPDF PDF generator.
Usage
First you need to create a PDF generation configuration. If you only need the default settings, the following would suffice for example:
contao_pdf_generation: configurations: my_pdf_config: ~
To use a PDF template, you can define the absolute path to the template like this for example:
contao_pdf_generation: configurations: my_pdf_config: pdf_template: '%kernel.project_dir%/files/pdf/my_pdf_template.pdf'
To integrate a custom font, you also need to define the absolute path to the font files:
contao_pdf_generation: configurations: my_pdf_config: fonts: default_font: foobar custom_fonts: foobar: R: '%kernel.project_dir%/files/pdf/Foobar-Regular.ttf' B: '%kernel.project_dir%/files/pdf/Foobar-Bold.ttf'
check the output of config:dump-reference contao_pdf_generation for more options.
Next you will have to select a PDF generation configuration in your Contao page layout. You can find this in the Expert settings tab of your layout under PDF generation configuration. Only pages with a valid PDF generation configuration layout will be able to actually generate a PDF.
Next you will have to create a Generate PDF content element. This element will output a form with a submit button that will trigger the PDF generation for the current page. Insert this element then either in your layout, or directly in your content somewhere.
Note
If you need support for default layouts, install version 1.x of this extension.
inspiredminds/contao-pdf-generation 适用场景与选型建议
inspiredminds/contao-pdf-generation 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 196 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 12 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 inspiredminds/contao-pdf-generation 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 inspiredminds/contao-pdf-generation 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 196
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2024-12-04