Skip to content

Commit

Permalink
Merge pull request #2 from AgID/fix/pdf-report-logo
Browse files Browse the repository at this point in the history
Fix: obsolete Matomo namespace causing error in report creation
  • Loading branch information
irinafdochia authored Dec 5, 2023
2 parents d6ab0ab + 53feb3d commit 821b984
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CustomPdfRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Piwik\Filesystem;
use Piwik\NumberFormatter;
use Piwik\Piwik;
use Piwik\Plugins\API\API;
use Piwik\Plugins\CoreAdminHome\CustomLogo;
use Piwik\ReportRenderer;
use Piwik\TCPDF;

Expand Down Expand Up @@ -193,7 +193,9 @@ public function renderFrontPage($reportTitle, $prettyDate, $description, $report
'DF', "", array(0, 102, 204)); // where the array is the color expected

// logo
$this->TCPDF->Image(API::getInstance()->getLogoUrl(true), $this->logoImagePosition[0], $this->logoImagePosition[1], 0, 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300);
$customLogo = new CustomLogo();
$this->TCPDF->Image($customLogo->getLogoUrl(true), $this->logoImagePosition[0], $this->logoImagePosition[1], 0, 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300);
$this->TCPDF->Ln(8);

// platform title
$this->TCPDF->SetFont($this->reportFont, '', $this->reportHeaderFontSize + 10);
Expand Down

0 comments on commit 821b984

Please sign in to comment.