@@ -284,22 +284,27 @@ public function actionPrintApplications($applicantId = null)
284
284
285
285
$ actionlogo = "file:/// " . realpath (Yii::getAlias ('@images/logo.jpg ' ));
286
286
$ pdelogo = "file:/// " . realpath (Yii::getAlias ('@images/pdelogo.jpg ' ));
287
+ $ content = $ this ->renderPartial ('/application/print ' , ['data ' => $ data ]);
287
288
288
- $ content = $ this ->renderPartial ('../application/print ' , ['data ' => $ data ]);
289
- // setup kartik\mpdf\Pdf component
290
289
$ pdf = new Pdf ([
291
290
'mode ' => Pdf::MODE_UTF8 ,
292
291
'format ' => Pdf::FORMAT_A4 ,
293
292
'orientation ' => Pdf::ORIENT_PORTRAIT ,
294
- 'filename ' => 'aitisi .pdf ' ,
293
+ 'filename ' => 'ΑΙΤΗΣΗ-ΔΗΛΩΣΗ .pdf ' ,
295
294
'destination ' => Pdf::DEST_DOWNLOAD ,
296
295
'content ' => $ content ,
297
296
'cssFile ' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css ' ,
298
- 'cssInline ' => '.kv-heading-1{font-size:18px} ' ,
299
- 'options ' => ['title ' => 'Περιφερειακή Διεύθυνση Πρωτοβάθμιας και Δευτεροβάθμιας Εκπαίδευσης Κρήτης ' ],
297
+ 'cssInline ' => '.kv-heading-1{font-size:16px} ' ,
298
+ 'options ' => [
299
+ 'title ' => 'Περιφερειακή Διεύθυνση Πρωτοβάθμιας και Δευτεροβάθμιας Εκπαίδευσης Κρήτης ' ,
300
+ 'defaultheaderline ' => 0 ,
301
+ 'defaultfooterline ' => 0
302
+ ],
303
+ 'marginTop ' => Yii::$ app ->params ['pdf ' ]['marginTop ' ],
304
+ 'marginBottom ' => Yii::$ app ->params ['pdf ' ]['marginBottom ' ],
300
305
'methods ' => [
301
306
'SetHeader ' => ['<img src= \'' . $ pdelogo . '\'> ' ],
302
- 'SetFooter ' => ['<img src= \'' . $ actionlogo . '\'>Σελίδα: {PAGENO} από {nb} ' ],
307
+ 'SetFooter ' => ['<p style="text-align: center; border-top: 1px solid #ccc;">Σελίδα {PAGENO} από {nb}<br>< img src= \'' . $ actionlogo . '\'></p> ' ],
303
308
]
304
309
]);
305
310
@@ -326,24 +331,30 @@ public function actionPrintDenials($applicantId = null)
326
331
327
332
$ actionlogo = "file:/// " . realpath (Yii::getAlias ('@images/logo.jpg ' ));
328
333
$ pdelogo = "file:/// " . realpath (Yii::getAlias ('@images/pdelogo.jpg ' ));
329
- $ content = $ this ->renderPartial ('.. /application/print-denial ' , [
334
+ $ content = $ this ->renderPartial ('/application/print-denial ' , [
330
335
'data ' => $ data ,
331
336
'info_content ' => \app \models \Page::getPageContent ('info_denial ' )
332
337
]);
333
- // setup kartik\mpdf\Pdf component
338
+
334
339
$ pdf = new Pdf ([
335
340
'mode ' => Pdf::MODE_UTF8 ,
336
341
'format ' => Pdf::FORMAT_A4 ,
337
342
'orientation ' => Pdf::ORIENT_PORTRAIT ,
338
- 'filename ' => 'aitisi .pdf ' ,
343
+ 'filename ' => 'ΔΗΛΩΣΗ-ΑΡΝΗΣΗΣ-ΤΟΠΟΘΕΤΗΣΗΣ .pdf ' ,
339
344
'destination ' => Pdf::DEST_DOWNLOAD ,
340
345
'content ' => $ content ,
341
346
'cssFile ' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css ' ,
342
- 'cssInline ' => '.kv-heading-1{font-size:18px} ' ,
343
- 'options ' => ['title ' => 'Περιφερειακή Διεύθυνση Πρωτοβάθμιας και Δευτεροβάθμιας Εκπαίδευσης Κρήτης ' ],
347
+ 'cssInline ' => '.kv-heading-1{font-size:16px} ' ,
348
+ 'options ' => [
349
+ 'title ' => 'Περιφερειακή Διεύθυνση Πρωτοβάθμιας και Δευτεροβάθμιας Εκπαίδευσης Κρήτης ' ,
350
+ 'defaultheaderline ' => 0 ,
351
+ 'defaultfooterline ' => 0
352
+ ],
353
+ 'marginTop ' => Yii::$ app ->params ['pdf ' ]['marginTop ' ],
354
+ 'marginBottom ' => Yii::$ app ->params ['pdf ' ]['marginBottom ' ],
344
355
'methods ' => [
345
356
'SetHeader ' => ['<img src= \'' . $ pdelogo . '\'> ' ],
346
- 'SetFooter ' => ['<img src= \'' . $ actionlogo . '\'>Σελίδα: {PAGENO} από {nb} ' ],
357
+ 'SetFooter ' => ['<p style="text-align: center; border-top: 1px solid #ccc;">Σελίδα {PAGENO} από {nb}<br>< img src= \'' . $ actionlogo . '\'></p> ' ],
347
358
]
348
359
]);
349
360
0 commit comments