Opened 13 years ago
Closed 12 years ago
#391 closed enhancement (duplicate)
Presentation and/or document media type support?
Reported by: | Christopher Allan Webber | Owned by: | Jorge Araya Navarro |
---|---|---|---|
Priority: | major | Milestone: | 0.4.0 |
Component: | programming | Keywords: | review |
Cc: | Parent Tickets: |
Description
It would be nice if we could support viewing presentations and/or documents in MediaGoblin. Minimally, it would be great if I could upload PDFs and have them openable in MediaGoblin via pdf.js.
See:
https://beta.mozillalabs.com/en-US/pdfjs/
https://github.com/andreasgal/pdf.js
Change History (11)
comment:1 by , 13 years ago
Milestone: | 0.2.1 |
---|
comment:2 by , 13 years ago
Component: | component1 → programming |
---|
comment:3 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 13 years ago
I think more than writing a view, this is actually about adding a media type, which actually shouldn't require adding any more views. But you are right, this is completely undocumented and definitely requires quite a bit of mentoring.
I'm happy to provide some assistance with this if it's something you're interested in working on... I'll be available next weekend to do some talking and will become increasingly very available starting next month.
My thoughts on this are pretty simple:
- I think for now just supporting downloading, verifying, and displaying PDFs is sufficient
- So, the processing stage should be more verification than anything else I suspect? We could try opening the PDF with some sort of library to verify that it *is* a PDF. Is that overkill? Should verification be optional? Are there any decent libraries for this?
- Again, on the display side, I think we should use pdf.js
By the way, adding new media types is not an easy thing to do if you are fairly new to doing mediagoblin hacking. Not to discourage you though... if you are indeed very interested I am more than happy to help you walk you through the process!
comment:5 by , 12 years ago
Milestone: | → 0.3.3 |
---|
comment:6 by , 12 years ago
Please review and merge my patch media_handler_pdf which provides initial PDF support. (it depends on prior merging of the get_thumb_url branch as proposed in issue #533). This branch allows uploading/downloading of PDF files and uses a generic PDF icon as fallback preview.
Once this is done, I have another experimental (but still hacky and non-mergable) branch that uses pdf.js to display the PDF.
Git repo is at: git://gitorious.org/~spaetz/mediagoblin/spaetz-mediagoblin.git
comment:7 by , 12 years ago
Keywords: | review added |
---|
I just updated the media_handler_pdf branch to the latest master and made it work again. It provides initial .pdf support, just displaying a pdf thumbnail and offering the possibility to download the file.
Once that is in, we could work on displaying the pdf via pdf.js and find a library that actually let's us extract some useful metadata from the file. I would be happy if someone could review this branch.
comment:8 by , 12 years ago
Milestone: | 0.3.3 → 0.3.4 |
---|
I think the pdf.js route is an awesome direction to go, but a prerequisite to this being a mergable feature. Document support might be cool for 0.3.4 though.
comment:9 by , 12 years ago
See http://issues.mediagoblin.org/ticket/672#comment:2 , I've also started work on PDF.js but am stuck with a lack of css knowledge and a good design direction - do we want to force it to be in the same size (640x640 ~) display you get for all other media types, do we want a full mode that is similar to what you get with pdf.js viewer.html (i.e. thumbnail, overview working, find) in addition to full screen?
comment:10 by , 12 years ago
In the case of pdf.js, I actually think 640 width makes sense, but 640 height is too small.
How about restricting on the width but not the height?
I'm not sure about other features because I haven't tried pdf.js enough to comment there. :)
comment:11 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
This is implemented properly by #672 which is now merged! So I'm closing this as a duplicate :)
This will be something hard, at least for me, because the process to implement any view for any media type isn't documented AFAIK. Otherwise, I'll take this bug... but I need some mentoring here