简体   繁体   English

如何在浏览器中显示可打印的PDF文档?

[英]How to show the printable PDF document with in the browser?

I want show the printable document directly with in the browser when I clicked on print button in my application. 我想在我的应用程序中单击打印按钮时直接在浏览器中显示可打印文档。 I already checked the 'Display PDF in browser' in adobe reader preferences and other PDF files are also being opened in my browser other than that my printable documents. 我已经检查了Adobe Reader首选项中的“在浏览器中显示PDF”,并且除可打印文档之外,其他PDF文件也在浏览器中打开。 Can you please suggest me 你能建议我吗?

Thanks, Vara Kumar PJD 谢谢,Vara Kumar PJD

Check that PDF sent as response when clicken on print button has correct MIME type (application/pdf). 检查单击打印按钮时作为响应发送的PDF是否具有正确的MIME类型(应用程序/ pdf)。 THis will allow browers to recognize it as PDF content and handle it as you want. 这将使浏览者将其识别为PDF内容并根据需要进行处理。

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

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