Difference between #29 and #30 of
Yii v2 snippet guide II

Revision #30 has been created by rackycz on Oct 2, 2020, 10:22:26 AM with the memo:

TCPDF
« previous (#29) next (#31) »

Changes

Title unchanged

Yii v2 snippet guide II

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2,snippets

Content changed

[...]
```php
$pdf->writeHTML($html);
```

**Note:** When printing pageNr and totalPageCount to the footer, writeHTML() was not able to correctly interpret methods getAliasNumPage() and getAliasNbPages() as shown in [Example 3](https://tcpdf.org/examples/example_003/). I had to use rendering  method Text() and position the numbers correctly like this:
 
 
```php
 
$this->writeHTML($footerHtmlTable);
 
$this->SetTextColor('128'); // I have gray pageNr
 
$this->Text(185, 279, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages());
 
$this->SetTextColor('0'); // returning black color
 
```
 



**New version of TCPDF**

... to be finished ...
[...]
4 0
3 followers
Viewed: 75 358 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Aug 26, 2020
Last updated: 3 years ago
Update Article

Revisions

View all history