/** * Create a new instance * * @param string $titlestring */ public function __construct($titlestring) { global $CFG; $this->namestring = $titlestring; $this->generatordate = date('Y-m-d', time()); parent::__construct('P', 'mm', 'A4', true, 'UTF-8'); $this->SetFont('helvetica', '', 12); $this->SetCreator('PDF Generator build 1.0'); $this->SetAuthor('Sebsoft PDF Generator build 1.0'); $this->SetTitle(get_string('pdf-meta:title', 'block_coupon')); $this->SetSubject(get_string('pdf-meta:subject', 'block_coupon')); $this->SetKeywords(get_string('pdf-meta:keywords', 'block_coupon')); $this->SetHeaderMargin(0); $this->SetFooterMargin(0); $this->SetMargins(0, 0, 0, true); // L-T-R. $this->SetAutoPageBreak(false, 0); $fn = helper::get_coupon_logo(); if (file_exists($fn)) { $this->logo = $fn; } }