wkhtmltopdf与'?'在URL中

时间:2018-03-17 18:05:34

标签: wkhtmltopdf

我的问题是关于'?'的使用与wkhtmltopdf

使用StackOverflow建议,我有一个wkhtmltopdf从a调用 php网页...例如,这可以按预期工作:

$exec_string = "xvfb-run -a -s "."\"-screen 0, 1024x768x24 \""." 
wkhtmltopdf http://example.com temp.pdf";

exec($exec_string); 

但是,如果我像这样添加URL:

http://example.com/?page=clients

wkhtmltopdf忽略page=clients并生成与上述结果相同的pdf。我甚至尝试过“as

...\"http://example.com/?page=clients \"...

但仍然没有好处。

如何强制wkhtmltopdf获取?page = clients piece?

1 个答案:

答案 0 :(得分:0)

我发现我的问题比wkhtmltopdf无法识别?page = clients更复杂。

该网页所属的网站是否具有“安全性”。在显示这样的页面之前检查。在这个框架之外进行的实验告诉我,wkhtmltopdf确实拾取了page = clients规范。