Download the PHP package smarterp-dev/pdf-template without Composer
On this page you can find all versions of the php package smarterp-dev/pdf-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download smarterp-dev/pdf-template
More information about smarterp-dev/pdf-template
Files in smarterp-dev/pdf-template
Package pdf-template
Short Description A Laravel package for creating PDF documents using mPDF with Khmer language support
License MIT
Informations about the package pdf-template
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:
-
Installed all dependencies:
- Created the required temporary directory for mPDF:
Running Tests
You can run the test suite using any of these methods:
-
Using Composer script (recommended):
-
Running PHPUnit directly:
-
Running specific test suite:
-
Running a specific test file:
- Running a specific test method:
Test Coverage Report
To generate an HTML test coverage report, run:
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:
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:
This will copy the package views to resources/views/vendor/smarterp-dev.
To publish only the template views:
This will copy the template views to resources/views/vendor/smarterp-dev/templates.
To publish example template views:
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:
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/template.md
License
MIT License. See LICENSE
All versions of pdf-template with dependencies
mpdf/mpdf Version ^8.0
illuminate/http Version ^8.0|^9.0|^10.0
illuminate/support Version ^8.83