AnsweredAssumed Answered

Making PDF Viewable in New Window Instead of Automatically Downloading

Question asked by David Wang on Apr 10, 2016
Latest reply on Aug 24, 2017 by Robert Kelley

Hi everyone!

 

I am having the issue of controlling how PDF files are opening on a course. When students click on the link for a PDF, a new tab quickly opens then closes, and the file then automatically downloads. Is there a way to modify this so that when students click the link, the new tab opens to show the PDF file?

 

I've been looking into the inline_viewer, but it isn't quite what I'm looking for. I should also mention that I have the chrome://plugins/ set to "always running" so PDFs on other websites are opening in new tabs. The only issue I'm having is on our own course! My HTML for the PDF files I've been using look something like this:

 

<p style="font-size: 16px;"><a href="/courses/xxx/files/xxxxx/download?wrap=1" target="_blank" data-api-endpoint="https://canvas.rice.edu/api/v1/courses/xxx/files/xxxxx" data-api-returntype="File">Open File</a></p>

 

Many thanks!

Outcomes