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 uses a standard code to display the pdf file in web browser. The process of displaying pdf involves location of the PDF file on the server and it uses various types of headers to define content composition in form of type, Disposition, Transfer-Encoding etc. PHP passes the PDF files to read it on the browser.
Under "Privacy and security," click Content settings. Near the bottom, click PDF documents. Turn off Download PDF files instead of automatically opening them in Chrome.
Generally, a hyperlink is used to link a PDF document to display in the browser. An HTML anchor link is the easiest way to display a PDF file. But if you want to display a PDF document on the web page, PDF file needs to be embedded in HTML. The HTML <embed> tag is the best option to embed PDF document on the web page.
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.
http://php.net/manual/en/book.pdf.php
You can't BUT You can make one with 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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With