简体   繁体   English

使用TCPDF显示现有的PDF

[英]Display an existing PDF using TCPDF

I am using TCPDF to generate PDF and display them in the page where I am generating it. 我正在使用TCPDF生成PDF并将其显示在生成它的页面中。 I have given the user the choice to archive the pdf to file. 我给了用户选择将pdf归档到文件的选择。 In my application there a section that shows all the archived files. 在我的应用程序中,有一个部分显示所有已归档的文件。 So my problem is, whow do I use TCPDF to just display an existing PDF file and display it in an iFrame. 所以我的问题是,我该怎么使用TCPDF来显示现有的PDF文件并将其显示在iFrame中。

Thank you in advance 先感谢您

You can use <embed> tag of your iframe page to prevent it from download. 您可以使用iframe页面的<embed>标记阻止其下载。

Link tcpdf.php on src attribute of <embed> <embed> src属性上链接tcpdf.php

<html>
<body>
<embed
type="application/pdf"
src="http://yoursite.com/tcpdf/tcpdf.php″
width="100%"
height="100%">
</embed>
</body>
</html>

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

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