djangocms-embedpdf
django CMS plugin to embed a PDF from django-filer directly into a page, using the EmbedPDF Snippet viewer.
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
- Python 3.10+
- Django 3.2+
- django CMS 3.11+
- django-filer
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
- Edit a CMS page.
- Add the Embedded PDF plugin (under Files).
- 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.
Release files for djangocms-embedpdf 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| djangocms_embedpdf-1.0.1.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| djangocms_embedpdf-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.4 kB
Release files / djangocms_embedpdf-1.0.1.tar.gz
| Download URL | djangocms_embedpdf-1.0.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfff81cd5ccf8824a78b9cce66eab88e2ad62e1cb9fe140baddf21198ed7be28
|
|
BLAKE2b-256 checksum How to use checksums |
9ef47ea8d6cdc16844e8dca18937b18c1392592c45369e2ad869e429880734d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / djangocms_embedpdf-1.0.1-py3-none-any.whl
| Download URL | djangocms_embedpdf-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0dc6a7a92ca2eac7c734f84da68390d6f86e3e52ed479d8595950a6d4bbb2dd6
|
|
BLAKE2b-256 checksum How to use checksums |
40e028f21076058a7d068a32f9cbe8c5bb4e6c4d89828cf089c7704c5199ea3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|