Django PDF ActionsΒΆ

π OverviewΒΆ
Transform your Django admin interface into a powerful PDF export engine! Django PDF Actions seamlessly integrates professional PDF generation capabilities into your existing Django models with minimal configuration.
graph LR
A[Django Admin] --> B[Select Records]
B --> C[Choose Export Action]
C --> D[PDF Generation]
D --> E[Download PDF]
style A fill:#e1f5fe
style E fill:#c8e6c9
β¨ Key FeaturesΒΆ
Add PDF export to any Django model with just 2 lines of code:
- Professional layouts with customizable styling
- Company branding with logos and headers
- Multiple page orientations and sizes
- RTL language support (Arabic, Persian)
- Efficient handling of large datasets
- Optimized memory usage
- Background processing for large exports
- Pagination for better performance
- Custom admin methods support
- Configurable fonts and colors
- Multiple export formats
- Advanced table styling
πββοΈ Quick StartΒΆ
Get up and running in 60 seconds:
# 1. Install the package
pip install django-pdf-actions
# 2. Add to your settings
INSTALLED_APPS = [
# ...
'django_pdf_actions',
]
# 3. Run migrations
python manage.py migrate
# 4. Add to your admin.py
from django_pdf_actions.actions import export_to_pdf_landscape, export_to_pdf_portrait
@admin.register(YourModel)
class YourModelAdmin(admin.ModelAdmin):
list_display = ('name', 'email', 'created_at')
actions = [export_to_pdf_landscape, export_to_pdf_portrait]
That's it!
Your Django admin now has professional PDF export capabilities!
π How It WorksΒΆ
sequenceDiagram
participant U as User
participant A as Django Admin
participant P as PDF Actions
participant R as ReportLab
participant F as File System
U->>A: Select records
U->>A: Choose PDF export action
A->>P: Process export request
P->>P: Get model data & settings
P->>R: Generate PDF document
R->>F: Create PDF file
F->>U: Download PDF
π Internationalization SupportΒΆ
Perfect for global applications with built-in RTL support:
graph TD
A[Multi-language Content] --> B{Text Direction}
B -->|LTR| C[English, French, German...]
B -->|RTL| D[Arabic, Persian, ...]
C --> E[Left-aligned Layout]
D --> F[Right-aligned Layout]
E --> G[Professional PDF Output]
F --> G
style A fill:#fff3e0
style G fill:#e8f5e8
π Use CasesΒΆ
Real-World Applications
- Employee lists
- Sales reports
- Inventory management
- Financial statements
- Invoices and receipts
- Certificates
- ID cards
- Product catalogs
- Data exports
- Performance reports
- Survey results
- Customer lists
π― Perfect ForΒΆ
- Businesses needing professional document generation
- Developers wanting quick PDF export functionality
- Multi-language applications requiring RTL support
- Large datasets requiring optimized performance
π οΈ Technical SpecificationsΒΆ
Feature | Specification |
---|---|
Python | 3.8+ |
Django | 3.2+ |
PDF Engine | ReportLab |
Languages | Unicode support, RTL languages |
File Sizes | Optimized for large datasets |
Performance | Memory-efficient processing |
π Documentation StructureΒΆ
mindmap
root((Documentation))
Getting Started
Installation
Quick Start
Basic Usage
Configuration
Settings
Advanced Config
Examples
Real-world Cases
Custom Methods
API Reference
Actions
Models
Utils
π€ Community & SupportΒΆ
- π¬ GitHub Discussions
- π Issue Tracker
- π Documentation
- π¦ PyPI Package
π LicenseΒΆ
This project is licensed under the MIT License - see the LICENSE file for details.
Ready to transform your Django admin? Let's get started!
[Get Started β](installation.md){ .md-button .md-button--primary }
[View Examples β](examples.md){ .md-button }