Skip to content

Commit 908c8d1

Browse files
committed
Updates to release v1.0.5
1 parent d00829e commit 908c8d1

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

CHANGE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Change Log: `yii2-mpdf`
22
=======================
33

4+
## Version 1.0.5
5+
6+
**Date:** 13-Oct-2018
7+
8+
- Correct `methods` parsing in output.
9+
410
## Version 1.0.4
511

612
**Date:** 09-Oct-2018

src/Pdf.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2018
55
* @package yii2-mpdf
6-
* @version 1.0.4
6+
* @version 1.0.5
77
*/
88

99
namespace kartik\mpdf;
@@ -258,11 +258,6 @@ public function initTempPaths()
258258
*/
259259
public function render()
260260
{
261-
if (!empty($this->methods)) {
262-
foreach ($this->methods as $method => $param) {
263-
$this->execute($method, $param);
264-
}
265-
}
266261
return $this->output($this->content, $this->filename, $this->destination);
267262
}
268263

@@ -371,12 +366,18 @@ public function execute($method, $params = [])
371366
* @param string $dest the output destination. Defaults to [[DEST_BROWSER]].
372367
*
373368
* @return mixed
369+
* @throws InvalidConfigException
374370
*/
375371
public function output($content = '', $file = '', $dest = self::DEST_BROWSER)
376372
{
377373
$api = $this->getApi();
378374
$css = $this->getCss();
379375
$pdfAttachments = $this->getPdfAttachments();
376+
if (!empty($this->methods)) {
377+
foreach ($this->methods as $method => $param) {
378+
$this->execute($method, $param);
379+
}
380+
}
380381
if (!empty($css)) {
381382
$api->WriteHTML($css, 1);
382383
$api->WriteHTML($content, 2);

0 commit comments

Comments
 (0)