如何在 PHP 中制作 PDF 查看器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2025586/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 04:43:07  来源:igfitidea点击:

How to make PDF viewer in PHP

phppdf

提问by saturngod

I want to open PDF file with PHP. Don't want to use Flash. Like google doc viewer. I just want to open PDF file. Can I do with PHP ?

我想用 PHP 打开 PDF 文件。不想使用 Flash。像谷歌文档查看器。我只想打开PDF文件。我可以用 PHP 吗?

采纳答案by TehDrew

PHP cannot natively open and display a PDF file to the browser. In most cases you want to just send the file to the browser and allow the Adobe Reader to open and display the file. However, if you are looking to pull data out of the PDF itself, then the PDF function built-into PHP may be of some help.

PHP 无法在本地打开 PDF 文件并将其显示到浏览器。在大多数情况下,您只想将文件发送到浏览器并允许 Adob​​e Reader 打开和显示文件。但是,如果您希望从 PDF 本身中提取数据,那么 PHP 内置的 PDF 函数可能会有所帮助。

http://php.net/manual/en/book.pdf.php

http://php.net/manual/en/book.pdf.php

回答by ucefkh

You can't BUTYou can make one with PHP

你不能但是你可以用PHP做一个

making a previews of each page like google reader

像谷歌阅读器一样预览每个页面

this links may help you How do I convert a PDF document to a preview image in PHP?

此链接可能对您有所帮助 如何在 PHP 中将 PDF 文档转换为预览图像?