Witam. Mam problem ponieważ MPDF nie interpretuje tego (początek pliku output.php):
.tg {border-collapse:collapse;border-spacing:0;border:none;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 14px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 14px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;}
.tg .tg-i0og{color:#000000}
.tg .tg-fdty{background-color:#efefef;color:#000000}
.tg .tg-oj8h{font-weight:bold;text-decoration:underline;background-color:#c0c0c0;color:#000000}
.tg .tg-m7i9{font-weight:bold;color:#000000;text-align:right;vertical-align:top}
.tg .tg-ux9m{font-weight:bold;font-size:20px;color:#000000;text-align:center}
.tg .tg-yw4l{vertical-align:top}
.tg .tg-fefd{color:#000000;vertical-align:top}
.tg .tg-uu2z{font-weight:bold;font-family:Arial, Helvetica, sans-serif !important;;background-color:#c0c0c0;color:#000000;text-align:center;vertical-align:top}
.tg .tg-wtwx{font-weight:bold;font-size:36px;color:#000000;text-align:center}
.tg .tg-p9h6{font-weight:bold;text-decoration:underline;font-size:15px;background-color:#c0c0c0;color:#000000}
jako css, tylko wrzuca to do pdf jako tekst.
Tak wygląda plik generujący pdf:
<?php
include('mpdf60/mpdf.php');
include('output.php');
$mpdf=new mPDF('UTF-8','A4','','' , 3,3,2,0,0,0);
$mpdf->SetDisplayMode('fullpage');
$mpdf->allow_charset_conversion=true;
$mpdf->charset_in='UTF-8';
$mpdf->WriteHTML($stylesheet,1);
$mpdf->list_indent_first_level = 0;
$mpdf->SetWatermarkImage('acnet.jpeg', 0.15, 'F');
$mpdf->showWatermarkImage = true;
$mpdf->WriteHTML($html,2);
$mpdf->Output("output.pdf","D");
?>
Przy czym output.php działa poprawnie. Wszystko wyświetla się tak jak powinno.
Proszę o wskazówki (IMG:
style_emoticons/default/smile.gif)
Ten post edytował fiskusmati 7.03.2016, 14:00:55