dynamic pdf need to open print box directly

我的未来我决定 提交于 2019-12-25 05:13:25

问题


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?


回答1:


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.




回答2:


There is code that uses JavaScript to print the page. Means the reader has to have JS enabled.

Add Print Support



来源:https://stackoverflow.com/questions/7265815/dynamic-pdf-need-to-open-print-box-directly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!