Skip to content

Commit

Permalink
workaround is not needed, if source not html
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippImhof committed Oct 26, 2024
1 parent eb9bab4 commit 58d0513
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions report.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,10 @@ protected function generate_pdf(string $text, string $header = '', string $subhe
// rather remove it here.
$text = str_replace("\xc2\xa0", " ", $text);

// Work around a bug with Atto, see MDL-82753 and MDL-67630.
$text = $this->workaround_atto_font_size_issue($text);
// If using the original text, work around a bug with Atto, see MDL-82753 and MDL-67630.
if ($this->options->source === 'html') {
$text = $this->workaround_atto_font_size_issue($text);
}

$doc = new pdf('P', 'mm', $this->options->pageformat);

Expand Down

0 comments on commit 58d0513

Please sign in to comment.