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 ¶
- [Project page] [https://code.google.com/p/seo-design-file-manager/](https://code.google.com/p/seo-design-file-manager/ "https://code.google.com/p/seo-design-file-manager")
- [GitHub] [https://GitHub.com/ushatel/seo-design-file-manager/](https://GitHub.com/ushatel/seo-design-file-manager "GitHub project")
- [Owner is] [http://seo-design.ua/](http://seo-design.ua/ "http://seo-design.ua/")
- [Developed by] Sysprog of http://martis-ua.com/
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.