|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hai every body,
I am working on IELTS project.In that from admin side we are uploading pdf files.But how can i down load those pdf files from front end.In my system i am having adobe 7.0 version it is working in my system.But those who are having version 5 or 6 they are not able to see the pdf file. This is the code for viewing pdf files. <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width=450 height=601 align="absmiddle"> <param name="SRC" value="../<?= $rows['quespdf_path']?>"> <embed src="../<?=$rows['quespdf_path']?>" width=500 height=601 align="absmiddle"> <NOEMBED> Your browser does not support embedded PDF files. </NOEMBED> </embed> </object> The above piece of code is working in my system.But it is not working in systems which are having lower versions like adobe 5 or 6. Please do need ful Thanking you |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
>phow can i down load those pdf files from front end.In my...
You could force a download... <?php function force_download($file) { $dir = "web_images/"; if ((isset($file))&&(file_exists($dir.$file))) { header("Content-type: application/force-download"); header('Content-Disposition: inline; filename="' . $dir.$file . '"'); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($dir.$file)); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . $file . '"'); readfile("$dir$file"); } else { echo "No file selected"; } //end if }//end function ?> |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
php.ajay@gmail.com wrote:
> Hai every body, > > I am working on IELTS project.In that from admin side we are uploading > pdf files.But how can i down load those pdf files from front end.In my > system i am having adobe 7.0 version it is working in my system.But > those who are having version 5 or 6 they are not able to see the pdf > file. > This is the code for viewing pdf files. > <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width=450 > height=601 align="absmiddle"> <param name="SRC" value="../<?= > $rows['quespdf_path']?>"> > <embed src="../<?=$rows['quespdf_path']?>" width=500 height=601 > align="absmiddle"> <NOEMBED> Your browser does not support embedded > PDF files. </NOEMBED> </embed> > </object> > The above piece of code is working in my system.But it is not working > in systems which are having > lower versions like adobe 5 or 6. > Please do need ful > > Thanking you > This isn't really a PHP question. You'll do better asking in an HTML newsgroup such as alt.html. Or an Adobe newsgroup might be even better (sorry, I don't frequent any of those). -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
macca wrote:
>> phow can i down load those pdf files from front end.In my... > > You could force a download... > > <?php > > > function force_download($file) > { > $dir = "web_images/"; > if ((isset($file))&&(file_exists($dir.$file))) { > header("Content-type: application/force-download"); > header('Content-Disposition: inline; filename="' . $dir.$file . > '"'); > header("Content-Transfer-Encoding: Binary"); > header("Content-length: ".filesize($dir.$file)); > header('Content-Type: application/octet-stream'); > header('Content-Disposition: attachment; filename="' . $file . > '"'); > readfile("$dir$file"); > } else { > echo "No file selected"; > } //end if > > }//end function > > > ?> > > This doesn't force a download. The browser is still free to ignore it. And it doesn't solve his problem with the object tag not being recognized. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On May 1, 2:31 am, php.a...@gmail.com wrote:
> > I am working on IELTS project.In that from admin side we are uploading > pdf files.But how can i down load those pdf files from front end.In my > system i am having adobe 7.0 version it is working in my system.But > those who are having version 5 or 6 they are not able to see the pdf > file. > This is the code for viewing pdf files. > <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width=450 > height=601 align="absmiddle"> <param name="SRC" value="../<?= > $rows['quespdf_path']?>"> > <embed src="../<?=$rows['quespdf_path']?>" width=500 height=601 > align="absmiddle"> <NOEMBED> Your browser does not support embedded > PDF files. </NOEMBED> </embed> > </object> Try an iframe instead: <iframe width=450 height=601 src="../<?= $rows['quespdf_path']?>"> Cheers, NC |
|
![]() |
| Outils de la discussion | |
|
|