Difference between #236 and #237 of
Yii v2 snippet guide

Revision #237 has been created by rackycz on Oct 1, 2020, 1:17:21 PM with the memo:

TCPDF
« previous (#236) next (#238) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
Important also is to righ-click your project, select Properties, then menu "Run configurations" and set correct path to your index.php. Best is to use the button "Browse"

Then you just add a breakpoint, click the debug-play button in NetBeans and refresh your browser. Netbeans will stop the code for you.

**PDF - no UTF, only English chars
 - FPDF**
---
For creating PDFs can be used [FPDF](http://www.fpdf.org) library. It is extremely simple to make it run. Just download it and then use it as a helper - I described how this is done [above](https://www.yiiframework.com/wiki/2552/yii-v2-snippet-guide#creating-your-new-helper-class). Do not forget to add namespace to FPDF.php.
[...]
A discussion is available [here](https://stackoverflow.com/questions/6334134/fpdf-utf-8-encoding-how-to).

**PDF - UTF, all chars
 - tFPDF**
---
[...]
Note to tFPFD: Once you use it, it creates a few PHP and DAT files in folder **unifont**. Delete them before uploading to the internet. They will contain hardcoded paths to fonts and must be recreated.

**PDF - 2D Barcodes - TCPDF**
 
---
 
See part II of this guide:
 
- [https://www.yiiframework.com/wiki/2558/yii-v2-snippet-guide-ii](https://www.yiiframework.com/wiki/2558/yii-v2-snippet-guide-ii)
 
 
**Export (not only GridView) to CSV in UTF-8 without extensions **
---
I will describe how to easily export GridView into CSV so that filers and sorting is kept. I do not use any extentions which are so famous today.
Note that GridView is not needed, I just want to show the most complicated situation.

Let's say you have page on URL user/index and it contains GridView where you can list and filter users.
[...]
7 0
4 followers
Viewed: 254 717 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: 5 months ago
Update Article

Revisions

View all history