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 (http://seo-design.ua)

If do you need to print the PDF files from the yii (http://yiiframework.com)

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

It uses the FPDF (http://fpdf.org) 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

Requirements

Yii 1.1.7

Usage

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"> 
<details_header>
<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> 
</details_header> 
<details_row> 
<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> 
</details_row> 
</details_table>

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

Resources

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

Downloads

show all

Related Extensions