使用 php 或 javascript 打开和打印 PDF

发布于 2024-12-02 19:39:22 字数 108 浏览 2 评论 0原文

我想编写一个函数,它接受 url 作为参数,然后它会打印 pdf...我该怎么做?

我应该使用 php 打开文件,然后使用 javascript 打印它吗?

感谢您的帮助

I want to write a function that takes a url as an argument and then it goes and prints the pdf... how can i do that?

should i open the file using php and then print it using javascript?

Thanks for the help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我喜欢麦丽素 2024-12-09 19:39:22

并打印 pdf

PHP 和 javascript 通常用于生成网页 - 服务器和客户端上都没有直接打印链接。即使在有意义的上下文中,这两种语言都没有打印 API,因此您需要使用操作系统或其他工具中的设施 - 并且您也没有提供有关此的详细信息。

PHP在哪里运行? JavaScript 在哪里运行?您希望在哪里打印 PDF(客户端/服务器)?最后应该进行打印的操作系统正在运行什么?

and prints the pdf

PHP and javascript are usually used for generating web pages - there is no direct link to printing on either the server nor the client. Even in contexts where this would make sense, there is no printing API in either language so you'd need to use the facilities within the OS or another tool - and you've provided no details about this either.

Where is the PHP running? Where is the Javascript running? Where do you want the PDF printed (client/server)? What OS is running at the end where printing should happen?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文