filemanager You can make any PDF document from the template from the CArrayDataProvider

  1. Requirements
  2. Usage
  3. Resources

This project was made for the needs of SEO Design (

If do you need to print the PDF files from the yii (

You can build the any PDF document from the text file markup with the use of FileManager class

It uses the FPDF ( as the PDF tool

  • Allows any text templates for the drawing in PDF format
  • Allows any the use of the CArrayDataAdapter as the data source
  • Allows to customize tables using own format
  • Allows to draw lines with the any width


Yii 1.1.7


To use the tool you just need to copy the code to your protected/components folder

It is possible to place the any field in the template {{field_name}} The tool FileManager->getDocsFile ( CArrayDataProvider ( $toPrint, array() ), 'template.txt' );

To draw the table in the PDF file you need to use the such example

<details_table key="goods"> 
<cell width="20"> № </cell><cell width="30"> Article </cell><cell width="60"> Goods </cell><cell width="30"> Quantity </cell><cell width="22"> Price </cell><cell width="22"> Total </cell> 
<cell width="20" align="center"> {{o_goods_number}} </cell><cell width="30"> {{o_goods_code}} </cell><cell width="60"> {{o_goods_title}} </cell><cell width="30"> {{o_goods_amount}} </cell><cell width="22" align="right"> {{o_goods_price}} </cell><cell width="22" align="right"> {{o_goods_total}} </cell> 

The FileManager will search for the $toPrint['details_table'] and than it draws the with the fields of $toPrint['details_table']['field_name']

Also it is possible to draw the line


0 0
1 follower
Yii Version: all
License: MIT
Category: Others
Developed by: sysprog
Created on: Jul 9, 2014
Last updated: 7 years ago


show all

Related Extensions