#115 Prevent PDF being polluted with HTML at the EOF
This commit is contained in:
parent
a943caf007
commit
1f219af560
2 changed files with 2 additions and 0 deletions
1
edit.php
1
edit.php
|
@ -210,6 +210,7 @@ if ($data = $mform->get_data()) {
|
|||
// Check if we want to preview this custom certificate.
|
||||
if (!empty($data->previewbtn)) {
|
||||
$template->generate_pdf(true);
|
||||
exit();
|
||||
}
|
||||
|
||||
// Redirect to the editing page to show form with recent updates.
|
||||
|
|
1
view.php
1
view.php
|
@ -137,4 +137,5 @@ if (empty($action)) {
|
|||
// Now we want to generate the PDF.
|
||||
$template = new \mod_customcert\template($template);
|
||||
$template->generate_pdf();
|
||||
exit();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue