printOwnerUser)) {
$owner = $this->app->trans('Printed with Phraseanet by %name% on %date%', ['%name%' => '' . $this->printOwnerUser->getDisplayName() .'', '%date%' => (new \DateTime())->format("Y/m/d")]);
$unNeededTextLength = sprintf('', $this->printOwnerUser->getEmail());
}
$this->SetLeftMargin(0);
$mr = $this->SetRightMargin(0);
$this->SetY(-15);
$this->SetFont(self::FONT, 'I', 8);
$this->Cell(0, 10, $this->app->trans('Page'). ' ' . $this->PageNo(), 0, 0, 'C');
if (empty($this->printOwnerUser)) {
$this->SetFont(self::FONT, '', 8);
$w = $this->GetStringWidth($this->app->trans('Printed by'));
$this->SetFont(self::FONT, 'B', 8);
$w += $this->GetStringWidth($owner);
$this->SetXY(-$w - $mr - 5, -15);
$this->SetFont(self::FONT, '', 8);
$this->Write(8, $this->app->trans('Printed by'));
$this->SetFont(self::FONT, 'B', 8);
$this->Write(8, ' Phraseanet');
} else {
$this->SetFont(self::FONT, '', 8);
$w = $this->GetStringWidth($owner) - $this->GetStringWidth($unNeededTextLength);
$this->SetXY(-$w - $mr -5, -15);
$this->SetFont(self::FONT, '', 8);
$this->writeHTMLCell($w,8, '', '', $owner);
}
}
public function setPrintOwnerUser($user)
{
$this->printOwnerUser = $user;
}
public function setApp($app)
{
$this->app = $app;
}
}