add pdf media type
The new media type supports pdf and a subset of media recognized by libreoffice via unoconv. Every document added goes through: * conversion to pdf with unoconv if not already a pdf * creation of thumbnail and medium sized image, and pdfinfo generates some information (even for unoconv produces docs - should fix this) Poppler (pdftocairo, pdfinfo) is used. http://poppler.freedesktop.org/ A working but uglified pdf.js integration exists, which is enabled by setting pdf.pdf_js=true mediagoblin_local.ini (disabled in mediagoblin.ini) Adds one test to the test_submission test suite, and another separate test_pdf suite. The tests are only run if media_types.pdf.processing.check_prerequisites passes, so the test suite will not require any extra package. TODO: make test suite say 'skipped' in that case instead of just 'ok' Signed-off-by: Alon Levy <alon@pobox.com>
This commit is contained in:
1448
mediagoblin/static/css/pdf_viewer.css
Normal file
1448
mediagoblin/static/css/pdf_viewer.css
Normal file
File diff suppressed because it is too large
Load Diff
1
mediagoblin/static/extlib/pdf.js
Symbolic link
1
mediagoblin/static/extlib/pdf.js
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../extlib/pdf.js
|
||||
3615
mediagoblin/static/js/pdf_viewer.js
Normal file
3615
mediagoblin/static/js/pdf_viewer.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user