承接 smarterp-dev/pdf-template 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

smarterp-dev/pdf-template

Composer 安装命令:

composer require smarterp-dev/pdf-template

包简介

A Laravel package for creating PDF documents using mPDF with Khmer language support

README 文档

README

PHP Tests

PDF Template Package

A Laravel package for generating PDF documents using mPDF with Khmer font support and custom templates.

Project Setup

Prerequisites

Before running tests or using the package, ensure you have:

  1. Installed all dependencies:

    composer install
  2. Created the required temporary directory for mPDF:

    mkdir -p temp/pdf

Running Tests

You can run the test suite using any of these methods:

  • Using Composer script (recommended):

    composer test
  • Running PHPUnit directly:

    vendor/bin/phpunit
  • Running specific test suite:

    vendor/bin/phpunit --testsuite=Unit
  • Running a specific test file:

    vendor/bin/phpunit tests/Unit/TemplateTest.php
  • Running a specific test method:

    vendor/bin/phpunit --filter=it_can_get_config_with_default_values

Test Coverage Report

To generate an HTML test coverage report, run:

composer test-coverage

This will create HTML reports in the coverage directory.

Continuous Integration

GitHub Actions workflow in .github/workflows/run-tests.yml automatically runs tests across multiple PHP and Laravel versions on push or pull request.

Extending Tests

When adding new features, please add corresponding tests in:

  • Unit tests: tests/Unit/

Installation

You can install the PDF Template package via Packagist:

1. Require the package via Composer

Run the following command in your project root:

composer require smarterp-dev/pdf-template

2. Publish the package views (optional)

If you want to customize the PDF templates, you can publish the package's views to your Laravel application's resources directory:

php artisan vendor:publish --tag=views

This will copy the package views to resources/views/vendor/smarterp-dev.

To publish only the template views:

php artisan vendor:publish --tag=view-templates

This will copy the template views to resources/views/vendor/smarterp-dev/templates.

To publish example template views:

php artisan vendor:publish --tag=view-examples

This will copy example templates to resources/views/vendor/smarterp-dev/templates/examples.

3. Create the required temporary directory for mPDF

mPDF requires a writable temporary directory. Create it with:

mkdir -p temp/pdf

4. Configuration

The package will automatically register its service provider. No manual configuration is required for basic usage.

5. Ready to Use

You can now use the package in your Laravel application. For usage examples and API documentation, refer to docs/pdf.md and docs/template.md

License

MIT License. See LICENSE

smarterp-dev/pdf-template 适用场景与选型建议

smarterp-dev/pdf-template 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 76 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 05 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 smarterp-dev/pdf-template 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 76
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-12