inspiredminds/contao-isotope-pdf-templates 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inspiredminds/contao-isotope-pdf-templates

Composer 安装命令:

composer require inspiredminds/contao-isotope-pdf-templates

包简介

Adds a new document type in Contao Isotope where you can define PDF templates.

README 文档

README

Contao Isotope PDF Templates

Adds a new document type in Contao Isotope where you can define PDF templates.

Important: version 2.x of this extension uses mPDF instead of TCPDF. Here are some things to note:

  • mPDF only supports the following fonts: https://mpdf.github.io/fonts-languages/fonts-in-mpdf-7-x.html.
  • mPDF has superior HTML and CSS capabilities.
  • It is recommended to use a full HTML markup in your iso_document_… template.
  • By default only PDF documents up to PDF version 1.4 are supported by the FPDI PDF-Parser used by mPDF, thus you may need to convert them to this version beforehand. However, you can buy the commercial version in order to be able to convert any PDF.

Screenshot

Custom fonts

Since version 2.1.0 you are able to integrate custom fonts directly via the back end. First you need to upload the TTF files into a directory within /files. Then you need to chose that folder in the font settings of the document. After choosing the correct folder you need to save the settings, then you will be able to configure the discovered font files.

Screenshot

For each font you want to use you need enable it and set the variant and name of the font in lowercase.

Note: mPDF maps certain common font names to its own default fonts. If a font is not working, try setting a more unique font name.

Event

The extension provides a ModifyPdfEvent with which you can access the mPDF Isotope Document instance, in order to change some parameters or add additional variables etc.

// src/EventListener/ModifyPdfEventListener.php
namespace App\EventListener;

use InspiredMinds\ContaoIsotopePdfTemplatesBundle\Event\ModifyPdfEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(ModifyPdfEvent::EVENT_NAME)]
class ModifyPdfEventListener
{
    public function __invoke(ModifyPdfEvent $event): void
    {
        // Access the mPDF object instance
        $mpdf = $event->getPdf();

        // Access the Isotope Document instance
        $document = $event->getDocument();
    }
}

inspiredminds/contao-isotope-pdf-templates 适用场景与选型建议

inspiredminds/contao-isotope-pdf-templates 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.83k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 05 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「template」 「pdf」 「templates」 「contao」 「isotope」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 inspiredminds/contao-isotope-pdf-templates 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 inspiredminds/contao-isotope-pdf-templates 我们能提供哪些服务?
定制开发 / 二次开发

基于 inspiredminds/contao-isotope-pdf-templates 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3.83k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 19
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2019-05-01