adds print.css

This commit is contained in:
buttle 2021-09-13 12:53:12 +02:00
parent 310f1c531a
commit eeaed03d7d
2 changed files with 6 additions and 1 deletions

3
asset/css/print.css Normal file
View File

@ -0,0 +1,3 @@
h1 {
color: red;
}

View File

@ -102,7 +102,9 @@ class TechDocument extends AbstractBlockLayout
.'</td> .'</td>
</tr> </tr>
</table>'); </table>');
$mpdf->WriteHTML($html); $stylesheet = file_get_contents('./modules/TechDocument/asset/css/print.css');
$mpdf->WriteHTML($stylesheet, 1);
$mpdf->WriteHTML($html, 2);
$mpdf->Output($this->storage_dir.'/docs/'.$document_name, \Mpdf\Output\Destination::FILE); $mpdf->Output($this->storage_dir.'/docs/'.$document_name, \Mpdf\Output\Destination::FILE);
} }