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.
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfff81cd5ccf8824a78b9cce66eab88e2ad62e1cb9fe140baddf21198ed7be28
|
|
| MD5 |
9797da26db842004a94252deed7b075e
|
|
| BLAKE2b-256 |
9ef47ea8d6cdc16844e8dca18937b18c1392592c45369e2ad869e429880734d8
|
File details
Details for the file djangocms_embedpdf-1.0.1-py3-none-any.whl.
File metadata
- Download URL: djangocms_embedpdf-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dc6a7a92ca2eac7c734f84da68390d6f86e3e52ed479d8595950a6d4bbb2dd6
|
|
| MD5 |
e9553213247c6b1c075e8b6fc0c7b888
|
|
| BLAKE2b-256 |
40e028f21076058a7d068a32f9cbe8c5bb4e6c4d89828cf089c7704c5199ea3c
|