Download the PHP package kartik-v/yii2-mpdf without Composer
On this page you can find all versions of the php package kartik-v/yii2-mpdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-mpdf
yii2-mpdf
The yii2-mpdf extension is a Yii2 wrapper component for the mPDF library with enhancements. The mPDF library offers ability to generate PDF files from UTF-8 encoded HTML. This library is based on FPDF and HTML2FPDF, with a number of enhancements. The key features in the library are to be able to generate PDF files 'on-the-fly' from HTML content, handling different languages. Refer the documentation manual or the upstream mpdf site for further details and understanding of the library. The yii2-mpdf extension offers an easy way to integrate and use the mPDF library within your Yii application with subtle enhancements. The key features offerred with this release are:
- Setup
pdf
component globally in your yii application configuration. - Setup mPDF properties or call mPDF methods easily using simple array configuration.
- Enhances extension to setup your own custom CSS file for rendering the formatted HTML content.
- Extension has a built-in version of bootstrap.css (v3.3.0 modified for mPDF) to be applied by default. This will allow you to generate PDF content from bootstrap markup HTML easily.
- Offers easy way to prepend inline CSS in addition to your own CSS file.
- Offers easy to use object oriented methods to render complex PDF.
- Easy use of the extension like any Yii widget by using the render method with minimal configuration.
- The extension uses the latest development version (v6.0beta) of the mPDF library. It uses the composer repository
kartik-v/mpdf
on packagist as a source for this latest version. mPDF 6.0 can utilise OpenType layout tables to display complex scripts. This release (v6.0) contains fonts (open source) to cover almost every imaginable script / language. Includes support for Arabic or Indic scripts (as well as Khmer, Lao, Myanmar etc.). It also is expected to improve the display of Thai, Vietnamese and Hebrew. It also includes additional fonts for Chinese, Japanese, and Korean. - Inbuilt integration with yii2-grid extension that allows you to export grid as PDF and even generate advanced PDF reports.
Demo
Read the detailed documentation and usage of the extension.
Installation
The preferred way to install this extension is through composer.
Note: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the
minimum-stability
settings for your application's composer.json.
Either run
or add
to the section of your composer.json
file.
Usage
Widget Like Usage
The component can be used straightforward in a manner similar to any widget to render your HTML content as PDF. For example, you can call the component simply like below in your controller action:
Global Component
You can also setup the widget as a global component for use across your application with defaults preset. For example, setup the following in the components section of your Yii application configuration file:
Once you have setup the component, you can refer it across your application easily:
For other usage and details, read the detailed documentation.
Contributors
Code Contributors
This project exists thanks to all the people who contribute. [Contribute].
Financial Contributors
Become a financial contributor and help us sustain our community. [Contribute]
Individuals
Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]
License
yii2-mpdf is released under the BSD-3-Clause License. See the bundled LICENSE.md
for details.