Offline file preview issues- pdf, doc etc (only pictures work)

178 views
Skip to first unread message

Bernt Nilsen

unread,
Aug 17, 2016, 11:51:54 AM8/17/16
to Canvas LMS Users
Hi,

I was asked by a customer to install canvas, unfortunately I do not have to much knowledge with linux builds... 

The deployment will only be intranet based as the installation is a mobile vessel with very limited connectivity (i.e only a few email-addresses have internet access)

Is there a possibilty of getting file preview for pdf/doc/docx etc working in an offline environment? From a quick search in this group it looks like everyone is using scribd and/or google drive, and none of these are possible for me to use. At least as far as I know...

The system is up and running, and file download is working. Its only the file preview/view that is not working. Pictures display in the previewer though...

Graham Ballantyne

unread,
Aug 17, 2016, 12:45:17 PM8/17/16
to canvas-l...@googlegroups.com
Hi Brent,

At SFU, we're unable to use the built-in document previewer as it isn't compliant with our jurisdiction's privacy legislation. We wrote our own preview engine based on LibreOffice, and modified our Canvas installation to use it. It's called Predoc; it's a Rails application that you can install locally. You can find it on our Github: https://github.com/sfu/predoc. The mods to make it work in place of the built-in previewer are:


Hope that helps!

Graham.




--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Graham Ballantyne
IT Services
Simon Fraser University

Lucian Mihailescu

unread,
Jul 20, 2018, 11:23:33 PM7/20/18
to Canvas LMS Users
Hi Graham,

I take care of the Canvas for an independent distance learning school here in Abbotsford, BC (WCASDL), we're moving from Moodle to Canvas this summer.

If we install predoc, will that help with automatic previewing links to documents in Pages/Modules/Syllabus (instead of downloading them)? 

Or do we have to replace every link with a preview link like http://example.com/viewer?url=http://path/to/document ?

Thanks,

Lucian

Graham Ballantyne

unread,
Jul 21, 2018, 1:24:27 AM7/21/18
to canvas-l...@googlegroups.com
Hi Lucian,

Predoc can only preview files in the Files area of a course; it can't work in the Pages or other areas of a course. If you wanted to force a previous you'd have to replace the URL with that to the preview (e.g. https://yourcanvas.com/courses/5/files?preview=123456).

Since you're asking about Predoc, I assume you're moving to self-hosted Canvas? Do you mind if I ask why?

Instructure has said that they plan on open-sourcing their new document viewer which should give feature parity in that regard with cloud-hosted Canvas. I had some discussions with them last summer about it and I plan on raising the issue next week at Instructurecon.

Cheers,
Graham.


– 
Graham Ballantyne 
Senior Software Engineer | IT Services 
Simon Fraser University | Strand Hall 1001 
8888 University Dr., Burnaby, B.C. V5A 1S6 
604-837-6698  | gra...@sfu.ca

Lucian Mihailescu

unread,
Jul 21, 2018, 1:39:43 AM7/21/18
to Canvas LMS Users
Thank you, Graham! I appreciate your quick answer. I have now prodoc installed and the preview works in Files, in SpeedGrader. And the URL replacement works like you mentioned!

Yes, we're on self-hosted Canvas. It was too expensive for the school to go with Instructure. As I'm hosting their Moodle on my dedicated server, I wanted to help them with Canvas (on its own VPS), and the transition is going well. 

Have a good weekend and a good time at InstructureCon!

Lucian
Reply all
Reply to author
Forward
0 new messages