Merge branch 'MDL-70376-311' of git://github.com/peterRd/moodle into MOODLE_311_STABLE

This commit is contained in:
Sara Arjona
2021-09-01 16:52:08 +02:00
+4 -3
View File
@@ -824,13 +824,14 @@ class pdf extends TcpdfFpdi {
$this->currentpage++;
$template = $this->importPage($this->currentpage);
$size = $this->getTemplateSize($template);
$orientation = 'P';
if ($imageinfo["width"] > $imageinfo["height"]) {
if ($size['width'] < $size['height']) {
$temp = $size['width'];
$size['width'] = $size['height'];
$size['height'] = $temp;
}
$orientation = 'L';
} else if ($imageinfo["width"] < $imageinfo["height"]) {
if ($size['width'] > $size['height']) {
$temp = $size['width'];
@@ -838,7 +839,7 @@ class pdf extends TcpdfFpdi {
$size['height'] = $temp;
}
}
$orientation = $size['orientation'];
$this->SetHeaderMargin(0);
$this->SetFooterMargin(0);
$this->SetMargins(0, 0, 0, true);
@@ -847,7 +848,7 @@ class pdf extends TcpdfFpdi {
$this->AddPage($orientation, $size);
$this->SetAutoPageBreak(false, 0);
$this->Image('@' . $imagecontent, 0, 0, $size['w'], $size['h'],
$this->Image('@' . $imagecontent, 0, 0, $size['width'], $size['height'],
'', '', '', false, null, '', false, false, 0);
}
}