Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/254.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用CSS打印Pdf_Php_Symfony_Pdf - Fatal编程技术网

Php 使用CSS打印Pdf

Php 使用CSS打印Pdf,php,symfony,pdf,Php,Symfony,Pdf,我正在使用symfony framework开发一个网站。在我的应用程序中,我想以Pdf格式打印页面。我已成功使用SpraedPDFGeneratorBundle打印页面。问题是我的页面打印时没有Css。我不知道如何使用Pdf格式的Css打印页面 请帮助。添加样式表时添加media=“print” <link rel="stylesheet" type="text/css" media="print" href="style.css">

我正在使用symfony framework开发一个网站。在我的应用程序中,我想以Pdf格式打印页面。我已成功使用SpraedPDFGeneratorBundle打印页面。问题是我的页面打印时没有Css。我不知道如何使用Pdf格式的Css打印页面

请帮助。

添加样式表时添加media=“print”

<link rel="stylesheet" type="text/css" media="print" href="style.css">