【发布时间】:2014-04-17 15:04:53
【问题描述】:
当用户在我的 PHP 页面而不是 SaveAs 窗口中按下“打印”时,我正在尝试找到一种方法来打开“选择打印机”对话框。
我在这里阅读了所有帖子,找不到有效的回复。 还阅读了这篇文章: mPDF auto print issue
但以下代码会打开另存为窗口,而不是“选择打印机”窗口:
$pdf=new mPDF('en','A4','','DejaVuSansCondensed',$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);
$pdf->setAutoFont();
$pdf->SetHTMLHeader($header);
$pdf->SetHTMLFooter($footer);
$pdf->SetJS('this.print();');
$pdf->writeHTML($printable);
$pdf->输出();
谁能帮忙? 为什么我仍然得到“另存为”窗口?
【问题讨论】: