问题描述
我个人认为这是不可能的,但也许有人知道. (使用FPDF创建的PHP,PDF)我想知道是否可以打开该PDF并直接打开打印框.
有任何想法吗?
推荐答案
您应该嵌入一些JavaScript代码进行操作.
您也需要此组件: http://www.fpdf.de/downloads/addons/addons/addons/addons/36/
在页面的末尾,您有一个示例,在此处可以在用户打开文档后显示打印对话框.
其他推荐答案
有使用JavaScript打印页面的代码.意味着读者必须启用JS.
问题描述
i personally would think it's not possible, but maybe somebody knows. (PHP, PDF created with fpdf) I would like to know if it is possible to open that pdf and open the print box directly.
More or less the same as one could do window.print() with html/JS.
any one any ideas?
推荐答案
You should embed some javascript code to do it.
You'll need this component too: http://www.fpdf.de/downloads/addons/36/
In the end of the page you have an example where you can show a print dialog after user open the document.
其他推荐答案
There is code that uses JavaScript to print the page. Means the reader has to have JS enabled.