简体   繁体   English

动态pdf需要直接打开打印框

[英]dynamic pdf need to open print box directly

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. (PHP,使用fpdf创建的PDF)我想知道是否可以打开该pdf并直接打开打印框。

More or less the same as one could do window.print() with html/JS. 与使用html / JS进行window.print()大致相同。

any one any ideas? 任何一个想法吗?

You should embed some javascript code to do it. 您应该嵌入一些javascript代码来做到这一点。

You'll need this component too: http://www.fpdf.de/downloads/addons/36/ 您还将需要此组件: 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. 有一些代码使用JavaScript打印页面。 Means the reader has to have JS enabled. 意味着读者必须启用JS。

Add Print Support 添加打印支持

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM