cancel
Showing results for 
Search instead for 
Did you mean: 

Fix Bug in Canvas display of pdfs

Fix Bug in Canvas display of pdfs

Bug: Canvas overrides user browser preferences when pdfs are linked from Canvas servers, forcing Canvas-hosted pdfs (or jpegs, etc.)  to download instead of being displayed within the browser. (This behavior does not happen on iPads; there the pdfs are displayed correctly.) As far as I can tell, there is no way to force Canvas to behave. This appears to be an issue with the HTTP headers being sent by the Canvas server.

There are numerous complaints about this on the Canvas communities.

Requested fix: Allow user browser preferences to determine whether the pdfs are displayed inline or downloaded.

------------------------------

(2) Current “solutions": This problem has been mentioned many times in the Canvas community over the past few years. When I raised this problem with Canvas support, the bug was acknowledged, and I was told there is currently no fix or workaround. Problematic workarounds that have been suggested as solutions are:

Host pdfs on Google drive: Although this solution works, it is horribly insecure, as anyone with the link (or any web crawler, I presume) will be able to access the files. In other words, all lectures and problem set solutions would be indexed by Google and freely available to the world. Very bad idea.

Insert pdf into a Canvas page, then open the page instead of the pdf: This solution limits accessibility for a number of reasons. First and foremost, this “solution” leads to a preview that is limited to a small part of the browser window with all of the Canvas menus and other crap taking up most of the display. This limits accessibility, particularly on laptops. Additionally, there are many reports of  problems with the inline Canvas display (e.g., chopping off pages, corrupt display). Math faculty who have many scanned pages of solutions appear particularly irate.

Convert all pdfs to jpeg: This creates accessibilty issues, takes faculty time, creates very bloated websites, and is a gnarly kludge.

Live with it: This sucks and does not conform to good website design. Why force students to download their homework, for example, and view it in a second application? There are many times when users just need to check something quickly (e.g, a problem set solution). If students prefer their pdfs to be downloaded, they can always override the website designer through their browser preferences.

------------------------------

(3) Possible solution:

Root cause: The origin of this behavior appears to be inappropriately set HTTP headers by the Canvas server. Any attempts to override this behavior (e.g., by setting the MIME type with a type="application/pdf" tag) will not work, because the server's instructions (i.e., HTTP headers) are supposed to override the browser.

Working from the suggestion on the Canvas user boards (look for comments by Wilmer Prentius), I examined the header being returned by Canvas when the pdf is served:

content-disposition: attachment; filename="Cornell_Notes.pdf"
content-type: application/pdf

This means that the browser knows it is getting a pdf (content-type) but the server is telling it to download the file irrespective of the user's preferences (content-disposition).

Other issues: See the comment by Karen Matson in the same thread on the Canvas user boards about problems with the native Canvas pdf preview. In my opinion, it is a bad idea to go with custom pdf previewers because of issues like this. It would be far better to allow previews by well tested software (e.g., Apple, Adobe).

(1)
Tags (2)
7 Comments
Community Team
Community Team

Thanks for sharing this idea, mah11@cornell.edu‌. Would you please provide the case number for your Canvas support interaction?

Community Member

stefaniesanders‌ The case number is 03976743.

Community Member

I'd like this addressed too. Apart from user inconvenience, another issue with downloaded PDFs is a risk that users will continue to access the downloaded/offline PDF when an updated PDF is available.

Community Member

Ridiculous that this can't be addresed

Surveyor

I've spent hours trying to find a solution to why doc previews don't work for me and none of the existing threads have helped but I FINALLY FOUND IT

Some full access extensions on chrome that can read/write data can be culprits, for me this was Grammarly. Try disabling your extensions and adding them back one by one to find the culprit. You don't need to uninstall the extensions, just right click and set them to read and change site data only when you click the icon.

Surveyor

I would love to see this fixed!! It's definitely a pain to have students be forced to download the file when it's not something they actually need to do.

I haven't been able to get the inline preview to work either and even if I were to get it to work for myself I'm sure it would still be an issue for many students and I wouldn't want to have to try to troubleshoot that with them.

Surveyor

Just adding my voice to request this (surely quite basic!) feature.