If you have some PDF files and you want your visitor able to browse its content you need to create a PDF document portal. This would enhance the experience of your visitor in your site, which enable the to browse the PDF file, without downloading once at a time.
Follow this procedure
1. Download pdftk and pdfportal
2. Extract the content to your PHP-enabled web serve
3. Edit pdfportal.config.php to refer the location of pdftk on your system.
4. Let's assume you copy the pdfportal files in http://localhost/pdfportal/ and the PDF files are located in http://localhost/PDFcollection/, view this directory using the portal, pass it to pdfdir.php with this path:
http://localhost/pdfportal/pdfdir.php?dir=/PDFcollection/
pdfdir.php calls pdftk's dump_data operation to create info files for every PDF in this directory, as needed. It then uses these plain-text info files to create an informative HTML summary page.
In this way you can very quickly display the name of your PDF files and when the user click on its title it would show the contents.
Follow this procedure
1. Download pdftk and pdfportal
2. Extract the content to your PHP-enabled web serve
3. Edit pdfportal.config.php to refer the location of pdftk on your system.
4. Let's assume you copy the pdfportal files in http://localhost/pdfportal/ and the PDF files are located in http://localhost/PDFcollection/, view this directory using the portal, pass it to pdfdir.php with this path:
http://localhost/pdfportal/pdfdir.php?dir=/PDFcollection/
pdfdir.php calls pdftk's dump_data operation to create info files for every PDF in this directory, as needed. It then uses these plain-text info files to create an informative HTML summary page.
In this way you can very quickly display the name of your PDF files and when the user click on its title it would show the contents.
2 comments:
Hi,
The above points about browse the PDF file and the importance of pdftk and pdfportal in software, pdfdir.php file is used to create document files with HTML summary page for the user. Thanks a lot.
I had the same question that How to quickly show the content of a group of PDF files in HTML page? I wanted to make possible browse the PDF file, without downloading once at a time.You blog helped me a lot thanks a lot.
Post a Comment