diff --git a/backend/modules/card/controllers/UserCardController.php b/backend/modules/card/controllers/UserCardController.php
index abf8cf9..ccc5cc3 100755
--- a/backend/modules/card/controllers/UserCardController.php
+++ b/backend/modules/card/controllers/UserCardController.php
@@ -309,24 +309,39 @@ class UserCardController extends Controller
$pdf = new Pdf();
$mpdf = $pdf->api;
- $mpdf->SetHTMLHeader("
-
- |
- $headerText |
- {PAGENO} |
-
- ");
- $mpdf->SetHTMLFooter("
-
- |
- $footerText |
- {PAGENO} |
-
- ");
+ if (!pathinfo($resumeTemplate->header_image, PATHINFO_EXTENSION)) {
+ $mpdf->SetHeader($headerText);
+ } else {
+ $imagePath = Yii::getAlias('@frontend') . '/web' . $resumeTemplate->header_image;
+ $mpdf->setAutoTopMargin='stretch';
+ $mpdf->SetHTMLHeader(
+ "
+
$headerText
+
"
+ );
+ }
+
+// $mpdf->SetHTMLHeader("
+//
+// |
+// $headerText |
+// |
+//
+// ");
+
+// $mpdf->SetHTMLFooter("
+//
+// |
+// $footerText |
+// {PAGENO} |
+//
+// ");
$mpdf->WriteHTML("$userCard->resume_text
");
+ $mpdf->SetFooter('{PAGENO}');
+
$mpdf->Output("Resume - {$userCard->fio}", 'D'); // call the mpdf api output as needed
exit;
}