Skip to content

Commit

Permalink
Merge pull request #558 from spipu/revert-554-bugfix--fix-encoding-bug
Browse files Browse the repository at this point in the history
Revert "Fix encoding error which throws warnings"
  • Loading branch information
spipu authored Mar 22, 2020
2 parents 4676c08 + 5ed4ca1 commit abfe90e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Html2Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ protected function _setNewPositionForNewLine($curr = null)
if ($curr !== null && $sub->parsingHtml->code[$this->_parsePos]->getName() === 'write') {
$txt = $sub->parsingHtml->code[$this->_parsePos]->getParam('txt');
$txt = str_replace('[[page_cu]]', $sub->pdf->getMyNumPage($this->_page), $txt);
$sub->parsingHtml->code[$this->_parsePos]->setParam('txt', mb_substr($txt, $curr + 1, mb_strlen($txt, 'UTF-8'), 'UTF-8'));
$sub->parsingHtml->code[$this->_parsePos]->setParam('txt', substr($txt, $curr + 1));
} else {
$sub->_parsePos++;
}
Expand Down

0 comments on commit abfe90e

Please sign in to comment.