From ac49e3ccf1d2c0304a605a10d0676a5c247b9df2 Mon Sep 17 00:00:00 2001 From: iIronside Date: Thu, 24 Nov 2022 17:16:49 +0300 Subject: [PATCH] fix error with pdf file extension --- backend/modules/card/controllers/UserCardController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/modules/card/controllers/UserCardController.php b/backend/modules/card/controllers/UserCardController.php index 6bd4a45..10da2a8 100755 --- a/backend/modules/card/controllers/UserCardController.php +++ b/backend/modules/card/controllers/UserCardController.php @@ -332,8 +332,10 @@ class UserCardController extends Controller "); $mpdf->WriteHTML("
$userCard->resume_text
"); - $mpdf->Output("Resume - {$userCard->fio}", 'D'); // call the mpdf api output as needed - exit; + $filename = "Resume - " . $userCard->fio . ".pdf";//You might be not adding the extension, + + $mpdf->Output($filename, 'D'); // call the mpdf api output as needed + exit(); } private function downloadResumeDocx(UserCard $model)