Your Community is getting an upgrade!
Read about our partnership with Higher Logic and how we will build the next generation of the Instructure Community.
Hi,
I have an instructor who would prefer to open a specific PDF in a new tab when it it clicked. They DO NOT want the file preview (easy enough), but the link syntax...
https://[domain]/courses/161/files/4288/download?wrap=1
...always forces a file download (as the URL suggests). Is there some variant of this URL syntax, or an attribute within the <a> tag, that would change the MIME type.
As I type this, I realize that the bottom of the issue might be authentication; even so, an attempt to put a link like this into the HTML of a Canvas page...
https://[domain]/courses/161/files/4288/
...which would probably by OK for the instructor since it would look pretty similar to a browser-rendered PDF, gets pre-empted and changed by the Canvas text editor and is modified back into something looking like the above link.
This will endure through re-use in a Canvas course migration/copy with the login permissions intact because you aren't leaving Canvas or breaking a security rule.
Sort of...
As a designer and teacher, I generally loathe .pdf files in Canvas, but if your course makes it worthwhile for some reason, I can think of a roundabout way.
Since a .pdf essentially functions as an "image of text" (a picture of a document, instead of the actual document) you don't lose much by making it a high-resolution jpeg that completely fills a Canvas page.
Then, you can make that internal page link open in a new tab.
(I like to call those Inception-style links--fun huh?!--- those internal Canvas links inside of another Canvas RCE "box". Usually not an example of premium UX navigation planning, but it sounds like you want students to have two tabs open side-by-side? If so you will also want to include optional browser-tab handling instructions for lower skill-level students.)
Steps
Voila'
😀
Removing the inline preview is fairly easy from a technical perspective, but does require a few extra clicks. See How do I disable inline previews for files using the Rich Content Editor as an instructor? (the RCE is being deprecated in January 2021) and How do I embed course and user documents in the New Rich Content Editor as an instructor? for more information. That doesn't stop the download, though.
One easy way to accomplish this is to host the PDF outside of Canvas in a domain that doesn't match the Canvas domain. If the top level domain does match (usually the top 2 components), then Canvas will treat it as an internal link and replace the existing window. This is not a problem if your Canvas is hosted by Instructure, but it can be an issue if you're self-hosting. Doing this loses the logging of the asset access in the access report, so the faculty won't be able to tell who has viewed it or how many times.
That doesn't handle the internal Canvas part, though. If the instructor insisted on this, I would tell the instructor to tell the teach the students to ctrl-click (or right click and open in new tab) the link so it opens in a new window. The instructor could add a note at the point of download.
Changing the behavior that the students use for their other classes is likely to cause problems and opening in a new tab without letting them know you're doing that can be bad for accessibility. Converting it to an image is bad for accessibility as well. You have to be concerned about what happens with the different devices, not just a browser. A faculty member who wants something like this normally only views things from their perspectives without thinking about how it functions for others.
The MIME type headers are sent by the server, which means that you're going to have trouble overriding them through anything that you put onto a page. This thread has a good discussion of the problem and some other recommendations about what can be done: Fix Bug in Canvas display of pdfs
Agreed. This original scenario is not a good plan for overall accessibility standards, security logins, or course management from term to term.
Neighboring tabs and browser management skills are ok to include in instructions with links to guides to newbies if (for example in higher ed writing assignments) the student needs to complete their assignment while frequently referencing the instructions. Not perfect, just one possibility.
The overall question signals a need for better UX for the entire course and maximizing built-in Canvas features. It is always a worse course experience for students--and I mean without exception--when the teacher or designers re-invent some sort of parallel system and awkward workarounds to avoid using a programmed Canvas feature in the way it is programmed.
I say this a lot: Course creators get bored. Students get lost.
Students who get lost a lot will then get bored from being lost and tune out. The excitement needs to be in the subject matter, not the navigation.
*Incidentally, my fellow Course and Faculty support techs and I used to refer to .pdf's as "the long road."
Every faculty member who converts .docx to .pdf's without a real reason, needs to be corrected. 99% of the time .pdf is a mistake that creates more work down the road. If you think you need your Syllabus to be in .pdf for some protective reason, just know that you, the teacher, will be the one to change it and update it, while overall this is a lot harder. For example, If you think assignment directions need to be in .pdf, just try to update that when your faculty can't find the source doc and Adobe fouls up the format and adds misspelled words in a weird font. Not fun.
@James it sounds like you are very comfortable working with the HTML options and coding for additional functions.
My caution with the custom-coded approach was formed the hard way when I (and those better equipped at my institution to implement coded workarounds because we could) encountered Canvas updates or new releases that suddenly incapacitated a course or an entire division's courses with these features! Guess whose fault it is and who is left holding the bag to fix hundreds of courses at crunch time? Not Canvas.
Canvas is not responsible for the fallout when a custom solution that works for you suddenly stops.
Outside hosting or links to outside sites that the instructor maintains bring up content ownership and FERPA issues for my institutions, so we are trying to talk people out of this approach.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign InTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign In
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.