动态PDF需要直接打开打印框[英] dynamic pdf need to open print box directly

本文是小编为大家收集整理的关于动态PDF需要直接打开打印框的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我个人认为这是不可能的,但也许有人知道. (使用FPDF创建的PHP,PDF)我想知道是否可以打开该PDF并直接打开打印框.

或多或少与window.print()使用html/js.

有任何想法吗?

推荐答案

您应该嵌入一些JavaScript代码进行操作.

您也需要此组件: http://www.fpdf.de/downloads/addons/addons/addons/addons/36/

在页面的末尾,您有一个示例,在此处可以在用户打开文档后显示打印对话框.

其他推荐答案

有使用JavaScript打印页面的代码.意味着读者必须启用JS.

添加打印支持

本文地址:https://www.itbaoku.cn/post/2090939.html

问题描述

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.

Add Print Support