How to show a .PDF file from a link

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
4/30/2015 2:43:46 PM
Gravatar
Total Posts 90
Keep Smiling Phill

How to show a .PDF file from a link

I know I have done this before a long time ago... but I am damned if I can remember the trick to it.

I have put a Links page on a site and I want to add a link that points to a PDF file that is stored on the server.  At the moment I get a 404 error.

Could someone please help me out and point me to the help page that covers this issue?

Thanks in advance

Phill

5/1/2015 10:26:36 AM
Gravatar
Total Posts 1992

Re: How to show a .PDF file from a link

Hi Phill,

Linking to a PDF is done the same way as linking to any other document or file. If you're getting a 404, you probably have the path to the link wrong or their isn't a MIME type for PDF on the server.

You can add mime types using the web.config file. Open the web.config file and find the staticContent section. In this section, you should see several mime types. Add the following with the other mime types inside of the staticContent section:

<remove fileExtension=".pdf" />
<mimeMap fileExtension=".pdf" mimeType="application/pdf" />

HTH,
Joe D.

5/1/2015 12:10:51 PM
Gravatar
Total Posts 18444

Re: How to show a .PDF file from a link

another tip, make sure the pdfs you upload and link to have no special characters or spaces in the file name, those things have to be escaped with ugly characters in urls

5/2/2015 10:08:11 PM
Gravatar
Total Posts 90
Keep Smiling Phill

Re: How to show a .PDF file from a link

Hi Joe D.

Thanks for the help, sorry I was not able to test your suggestion and get back to you till now.

I checked the web,config file and I do not have a section titled "staticContent".  Where is the best place to add this section?  And what should it look like?

Thanks

Phill

5/2/2015 10:09:50 PM
Gravatar
Total Posts 90
Keep Smiling Phill

Re: How to show a .PDF file from a link

Hi Joe,

Thanks for the suggestion about naming files.  I checked and made a couple of small changes to comply with your suggestion.  I removed blanks and inserted  an "_" instead.  Also there are no symbols in the names.

Thanks
Phill

5/16/2015 3:21:20 AM
Gravatar
Total Posts 90
Keep Smiling Phill

Re: How to show a .PDF file from a link

Good morning guys,

Sorry it has taken so long to get back to you on this but I was ill and couldn't get to a computer for a while.

Anyway; I was successful in enter some text then adding a link to a PDF file from there.  Thanks.

What I was trying to do was use the "List/Links" page then Browse to the PDF document on the server and add it as the URL address.  Can this be done? 

Thanks, again sorry for the delay.

Phill

You must sign in to post in the forums. This thread is closed to new posts.