使用PHP脚本以PDF格式打印预览 [英] Print Preview in PDF Format Using PHP Script

查看:93
本文介绍了使用PHP脚本以PDF格式打印预览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我需要使用PHP脚本进行PDF格式的打印预览,例如 Google Chrome打印预览

推荐答案

您可以在指向Google Doc Viewer的php页面中嵌入iframe,并指定要显示的PDF文件。这是您应该添加到页面的代码:



You can embed an iframe in your php page pointing to Google Doc Viewer and specifying the PDF file you want to display. This is the code you should add to your page:

<iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>





然后你只需要设置自己的文档文件到url查询字符串param,就是这样!



Then you just need to set up your own document file to the "url" query string param and that's it!


这篇关于使用PHP脚本以PDF格式打印预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆