Skip to main content

Invenio module for previewing files.

Project description

https://img.shields.io/github/license/inveniosoftware/invenio-previewer.svg https://img.shields.io/travis/inveniosoftware/invenio-previewer.svg https://img.shields.io/coveralls/inveniosoftware/invenio-previewer.svg https://img.shields.io/pypi/v/invenio-previewer.svg

Invenio module for previewing files.

Features:

  • File previewing.

  • Support for PDF, ZIP, CSV, MARKDOWN, XML, JSON, PNG, JPG, GIF, and WEBP out-of-the-box.

  • Extensible API to create new previewers.

Further documentation available: https://invenio-previewer.readthedocs.io/

ReplayWeb.page License

All webrecorder assets (including ui.js and sw.js), which are bundled in InvenioRDM when installed, are provided unmodified and licensed under AGPLv3, the source code is available at: https://github.com/webrecorder/replayweb.page

Changes

Version v5.0.0 (released 2026-05-29)

  • chore(setup): bump dependencies

  • feat: Extend support for container item previewers.

  • i18n: correct format string in error message

  • feat: GeoJSON support

Version v4.1.1 (released 2026-03-04)

  • fix(pdfjs): switch to legacy bundle

Version v4.1.0 (released 2026-03-03)

  • refactor(pdfjs): Display ‘Download’ text on button

  • feat(pdfjs): open PDF at page from URL hash

Version v4.0.0 (released 2026-02-03)

  • chore(black): update formatting to >= 26.0

  • chore(setup): bump dependencies

Version v3.6.0 (released 2026-01-15)

  • feat(pdfjs): add download button

  • fix(pdfjs): change inherited template for pdfjs

Version v3.5.1 (released 2025-11-20)

  • fix(pdfjs): use single quotes for passing init config

Version v3.5.0 (released 2025-11-12)

  • feat(pdfjs): allow passing parameters to document init
    • Adds a new PREVIEWER_PDF_JS_DOCUMENT_INIT_PARAMS config to allow passing init parameters to pdfjsLib.getDocument().

  • docs: add config section in API reference

Version v3.4.2 (released 2025-11-04)

  • fix(pdfjs): specify Wasm URL parameter for OpenJPEG decoding

Version v3.4.1 (released 2025-10-21)

  • i18n: pulled translations

Version v3.4.0 (released 2025-10-08)

  • feat(warc): new Web Archive previewer

  • feat(pdfjs): bump pdfjs-dist to v5.x

Version v3.3.0 (released 2025-08-25)

  • fix(ext): avoid unecessary assert error
    • The check for an already registered previewer was just checking by name, instead of also verifying if the registered object is the same instance.

    • Instead of an assertion, we raise a RuntimeError with information about the already registered and conflicting previewer instances.

  • feat(pdfjs): open links in new tabs
    • Sets by default in the PDF.js settings that links open in a new tab. The old behaviort was that when clicking a link inside a previewed PDF, the navigation happens inside the iframe, which then because of the X-Frame-Options: sameorigin setting blocked the content.

  • feat(pdfjs): disable sandboxed JS execution by default
    • Adds a new PREVIEWER_PDF_JS_ENABLE_SCRIPTING config variable for allowing to disable the sandboxed JS execution support in PDF.js. This config is by default set to False.

  • file-list: show fallback message if file checksum is not available

Version v3.2.0 (released 2025-07-17)

  • i18n: pulled translations

Version 3.1.0 (release 2025-07-02)

  • fix(tests): add missing javascript dep

  • fix: pkg_resources DeprecationWarning

  • docs: add webp to all places formats are listed

  • feat: preview webp images

  • i18n: removed deprecated messages

  • fix: setuptools require underscores instead of dashes

  • csv: add max filesize check

Version 3.0.1 (release 2025-02-25)

  • fix: ModuleWarning: Deprecation Warning

Version 3.0.0 (release 2024-12-10)

  • fix: tests, compatibility with sqlalchemy>=2

  • setup: bump major dependencies

Version 2.3.0 (released 2024-12-10)

  • zip: move fullscreen.js to fix the zip previewer

  • pdfjs: upgrade to pdf.js v4

Version 2.2.2 (release 2024-11-30)

  • setup: change to reusable workflows

  • setup: pin dependencies

  • i18n:push translations

Version 2.2.0 (released 2024-03-26)

  • integrated new video/audio previewer

Version 2.1.2 (released 2024-03-12)

  • frontend: Improve display of ZIPs with long file names

Version 2.1.1 (released 2024-01-31)

  • markdown: default message if not previewable

  • markdown: fixed ascii encoding typo

Version 2.1.0 (Release 2023-12-05)

  • setup: migrate dependency from cchardet to charset_normalizer fixes problems with python3.11

  • setup: add python3.11 to test matrix

Version 2.0.2 (Release 2023-11-20)

  • CSV: Fix handling of small files.

Version 2.0.1 (Release 2023-09-14)

  • CSV: removed file size limit. The new extension can preview very large files.

Version 2.0.0 (Release 2023-09-14)

  • CSV: change JS rendering from d3 to papaparse, supporting rendering of very large files

  • add file size check to CSV extensions

  • refactor XML and ipynb extensions

Version 1.5.0 (Release 2023-08-17)

  • encoding: cleanup detection and override ASCII to default encoding

  • txt-preview: enables horizontal scrolling, avoid invalid coding errors and add option to truncate .txt file preview after PREVIEWER_TXT_MAX_BYTES

  • pull latest translations

Version 1.4.0 (Release 2023-03-02)

  • remove deprecated flask_babelex dependency

  • upgrade invenio_i18n

Version 1.3.9 (Release 2023-01-13)

  • remove inline script - pdf js

Version 1.3.8 (Release 2022-11-18)

  • add translations

Version 1.3.7 (Release 2022-09-05)

  • jupyter: fix previewer of jpynb

  • tests: upgrade invenio-db

Version 1.3.6 (Release 2022-03-31)

  • Fix dependencies

Version 1.3.5 (Release 2022-02-28)

  • Align bootstrap-sass version with Invenio-Theme version.

Version 1.3.3 (Release 2021-07-12)

  • Adds german translations

Version 1.3.2 (Release 2020-12-11)

  • Fixes the preview button and the question icon mark in the Jinja macro.

Version 1.3.1 (Release 2020-12-11)

  • Fixes the file download link the Jinja macro for listing files.

Version 1.3.0 (Release 2020-12-10)

  • Migration to Semantic-UI.

  • Drops support of flask-assets.

  • Fixes PDF.js static asset paths.

  • Migrate CI to GitHub Actions.

  • Fixes imports in Bootstrap and Semantic UI files.

Version 1.2.1 (Release 2020-05-07)

  • set Sphinx <3 because of errors related to application context

  • stop using example app

Version 1.2.0 (Release 2020-03-13)

  • Change flask dependency to centrally managed by invenio-base

  • Drop support for Python 2.7

Version 1.1.0 (Release 2019-12-20)

  • Changes styling and method signature of file_list macro.

Version 1.0.2 (Release 2019-11-21)

  • Removes inline styling from simple image previewer for Content Security Policy compliance

Version 1.0.1 (Release 2019-08-02)

  • Removes html sanitization config

Version 1.0.0 (release 2019-07-29)

  • Initial public release.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invenio_previewer-5.0.0.tar.gz (160.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invenio_previewer-5.0.0-py2.py3-none-any.whl (212.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file invenio_previewer-5.0.0.tar.gz.

File metadata

  • Download URL: invenio_previewer-5.0.0.tar.gz
  • Upload date:
  • Size: 160.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for invenio_previewer-5.0.0.tar.gz
Algorithm Hash digest
SHA256 d788e243936fe93e8230fa6fc561ec088e34e39144f32c83aeab89773d2b71f4
MD5 ac58c66e0fa674241298fd8adf9949bd
BLAKE2b-256 7a05e5a8793aa6c86a9e713b77b8902ed45d16bb97bd59853950b5ef1d0567e6

See more details on using hashes here.

File details

Details for the file invenio_previewer-5.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for invenio_previewer-5.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d089e877d4cf3b88b85c352183ff381791fd69d140c34e08a57ebf34d383e50e
MD5 0e589f92eaa9ae72a23b41778e3ebcba
BLAKE2b-256 11a46020f77d00a265cbe4d395a85323ab0f9d6c5bfbb86fdb5685db176d1c06

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page