divyakrishnan Posted December 8, 2010 Share Posted December 8, 2010 Hi.. I have an issue on my project.I want to open a particular page of a PDF file by clicking a hyper link.How should I do it?any idea ? I used the following code <?php header("Content-Type: application/pdf"); $pdfFile="readme.pdf#page=10"; ?> <html> <head> <title>Untitled Document</title> </head> <body> <a href="http://<?php echo $pdfFile; ?>">Click Here</a> </body> </html> But it showing an alert like following File does not begin with '%PDF-' After clicking alert showing a black screen.. can u please send me the entire code? Thanks... Link to comment https://forums.phpfreaks.com/topic/220995-opening-a-particular-page-of-a-pdf-by-clicking-a-hyper-link/ Share on other sites More sharing options...
trq Posted December 8, 2010 Share Posted December 8, 2010 PDF's are not html and as such don't respond to anchor tags. Your question has ZERO to do with php. Link to comment https://forums.phpfreaks.com/topic/220995-opening-a-particular-page-of-a-pdf-by-clicking-a-hyper-link/#findComment-1144316 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.