I have tried to upload it simply through the media library ,but it didnt display correctly (very low resolution) and some users couldnt even see it (just an empty space) ,so I used an iframe tag in a page and uploaded the pdf directly to the server.
<iframe frameborder="1" height="200" name="frame1" scrolling="yes" src="/wp-content/themes/abc/images/catalog.pdf" width="550"></iframe>
now it displays correctly but takes a lot of time to load the pdf to the page.
now for to users to dowmload the pdf I put a text “right-click for print or save as”.
I wish I could switch it with some kind of a button –download–.
perhaps I shouldnt upoload the pdf as is (25MB) and just upload images of the catalog.pdf pages ?,it will sure weigh less.but what will I do with the download,it will really slow down the website if all the users will download 25MB file.
I dont know if it is the right way to display and enable download for large pdf files,and try to minimize the use of plugins.
what is the best way to do it ?
thank you
If you’re using Apache, you can add something like this in your .htaccess file
AddType application/octet-stream .pdf
This will force everything with a .pdf extension to download instead of display in the browser.
If however you are not using Apache or if you want only certain files to download and others to display directly, you could use PHP to do this.
<?php
header("Content-disposition: attachment; filename=myfile.pdf");
header("Content-type: application/pdf");
readfile("myfile.pdf");
You could then link to this php file to download the PDF.
Why don’t you use Google Docs Viewer?
With it you can embedded PDF, XLS, DOC, etc…
Ex.: