Jump to content

[SOLVED] Downloading a PDF file from a CMS page


Recommended Posts

Hi there, 


I am trying to create a link which downloads a pdf file in a cms page within my site. The problem is that it tries to open it like a new cms page instead of downloading the file. So what I get instead is a Not found page.



Any help?


Thanks a lot

  • Like 1
Link to comment
Share on other sites

Not sure if I understand it right what you need, but I made some test PDF for download here:




When clicking the link at the bottom of the page, it will open it in a new page, or you can right click and save as... to download the file.



To get this, add some text to click on, like 'Download Here' in your cms page, select the page and click the create/edit link button.





or set a relative path from the root of your shop:


You can add some title that shows when hovering over the link, like 'Right Click to download' or so.


Save and try. You will see the text and a link to the PDF File when hovering over it. Clicking it opens it in a new page. Right click will give the opportunity to save it.



Hope this is what you needed,



Link to comment
Share on other sites

I don´t really know what the problem is. It is something really easy, but it seems the link doesn´t find the file. I am checking for misspelling, paths mistakes,.... but so far, I couldn't find anything and still not working.

Thanks anyway.



Link to comment
Share on other sites

Hi Fedeque,



When you hover over the link, do you see the URL you expected? 


Did you add the  http part in front of the domain name part if you added the domain name part yourself? If not, you will get something like this:




i.e double domain name.


otherwise just add the relative path from the shop root:




Can you give the URL to the page with the link? Maybe we see something strange...



Edited by PascalVG (see edit history)
  • Like 1
Link to comment
Share on other sites

For completeness sake, final solution found:


Assuming the path is correct, maybe the permissions are not set correctly, to let an outsider into the folder. I would move the PDF file to the shop root, as that folder doesn't need more permissions to reach.


Make sure the file itself has permissions set to 644 or 755 or so

My 2 cents

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...