Skip to main content

No project description provided

Project description

djangocms-embedpdf

django CMS plugin to embed a PDF from django-filer directly into a page, using the EmbedPDF Snippet viewer.

preview djangocms_embedpdf

Features

  • Pick a PDF from Filer and display it inline
  • Configurable viewer height (CSS value, e.g. 80vh, 600px)
  • Viewer UI localized from the active Django language
  • Simplified interface by default (View mode only, with fullscreen in the toolbar)
  • Optional override of EmbedPDF disabled UI categories via settings

Requirements

Installation

pip install djangocms-embedpdf

Add the app to your INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    "filer",
    "djangocms_embedpdf",
]

Run migrations:

python manage.py migrate djangocms_embedpdf

Usage

  1. Edit a CMS page.
  2. Add the Embedded PDF plugin (under Files).
  3. Select a PDF from Filer and optionally set the viewer height.

The plugin loads EmbedPDF from the CDN and mounts it on the page.

Configuration

EmbedPDF JavaScript URL

By default the viewer is loaded from the jsDelivr CDN. Override the script URL with:

DJANGOCMS_EMBEDPDF_JS_URL = "https://cdn.jsdelivr.net/npm/@embedpdf/snippet@2/dist/embedpdf.js"

Useful for pinning a version, using a mirror, or serving the file from your own static files.

Disabled UI categories

By default, editing features are hidden so editors get a read-oriented viewer. You can override this with:

DJANGOCMS_EMBEDPDF_DISABLED_CATEGORIES = [
    "mode-annotate",
    "mode-shapes",
    "mode-redact",
    "annotation",
    "redaction",
    "form",
    "insert",
    "history",
    "document-open",
    "document-close",
    "document-protect",
    "security",
    "panel-comment",
]

See the EmbedPDF customizing UI docs for the full list of categories.

Project details


Download files

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

Source Distribution

djangocms_embedpdf-1.0.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

djangocms_embedpdf-1.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file djangocms_embedpdf-1.0.1.tar.gz.

File metadata

  • Download URL: djangocms_embedpdf-1.0.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for djangocms_embedpdf-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dfff81cd5ccf8824a78b9cce66eab88e2ad62e1cb9fe140baddf21198ed7be28
MD5 9797da26db842004a94252deed7b075e
BLAKE2b-256 9ef47ea8d6cdc16844e8dca18937b18c1392592c45369e2ad869e429880734d8

See more details on using hashes here.

File details

Details for the file djangocms_embedpdf-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_embedpdf-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0dc6a7a92ca2eac7c734f84da68390d6f86e3e52ed479d8595950a6d4bbb2dd6
MD5 e9553213247c6b1c075e8b6fc0c7b888
BLAKE2b-256 40e028f21076058a7d068a32f9cbe8c5bb4e6c4d89828cf089c7704c5199ea3c

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