Overview • Features • Installation • Usage • Examples • Security • Contributing
PDmFer is a command-line tool designed to embed interactive elements into PDF documents with enterprise-grade reliability.
Transform ordinary PDFs into interactive, secure, and customized documents with download redirects, blur effects, password protection, and custom metadata.
PDmFer:
- TAKES your input PDF document
- EMBEDS interactive elements (download redirects, JavaScript, metadata)
- APPLIES visual effects (blur) and security (password protection)
- OUTPUTS enhanced, production-ready PDF
Built with robust error handling and optimized for high-performance processing of large PDFs across Windows, macOS, and Linux platforms.
- Python 3.8 or higher
- pip package manager
- Virtual environment (recommended)
1. CLONE THE REPOSITORY
git clone <repository-url>
cd pdmfer2. CREATE VIRTUAL ENVIRONMENT
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate3. INSTALL DEPENDENCIES
pip install -r requirements.txt
pip install -e .Get started in seconds:
# Basic download redirect
pdmfer -i input.pdf -o output.pdf --link "https://example.com"
# With blur and password
pdmfer -i input.pdf -o output.pdf --link "https://example.com" --blur Medium --password "secure123"
|
|
pdmfer -i input.pdf -o output.pdf --link "https://example.com" [options...]| Option | Description | Values | Default |
|---|---|---|---|
-i, --input |
Input PDF file path | File path | Required |
-o, --output |
Output PDF file path | File path | Required |
--link |
Link address for embedded PDF | URL string | Required |
--blur |
Blur level | None, Low, Medium, High |
None |
--password |
Password protection | Password string | None |
--redirect-message |
Custom pre-download message | Text string | None |
--title |
Custom PDF title metadata | Text string | None |
--author |
Custom PDF author metadata | Text string | None |
--subject |
Custom PDF subject metadata | Text string | None |
--keywords |
Custom PDF keywords metadata | Comma-separated text | None |
-v, --verbose |
Enable verbose output | Flag | Disabled |
Click to expand basic examples
# Simple download redirect
pdmfer -i input.pdf -o output.pdf --link "https://example.com"
# With blur effect
pdmfer -i input.pdf -o output.pdf --link "https://example.com" --blur High
# With password protection
pdmfer -i input.pdf -o output.pdf --link "https://example.com" --password "secret123"
# Complete basic example
pdmfer -i input.pdf -o output.pdf \
--link "https://example.com/download" \
--blur Medium \
--password "secure123" \
--redirect-message "Download will start shortly"Click to expand advanced examples
# Full customization with all options
pdmfer -i input.pdf -o output.pdf \
--link "https://example.com/download" \
--blur Medium \
--password "securepassword123" \
--redirect-message "Accessing secure content..." \
--title "Secure Document" \
--author "John Doe" \
--subject "Confidential Report" \
--keywords "secure,confidential,report" \
--verbose
# Process confidential corporate document
pdmfer -i confidential.pdf -o secure_confidential.pdf \
--link "https://internal.example.com/access" \
--blur High \
--password "enterprise_secret" \
--redirect-message "Accessing restricted content. Authentication required." \
--title "Confidential Document" \
--author "Corporate Security Team" \
--subject "Internal Use Only" \
--keywords "confidential,restricted,secure,corporate"
# Batch processing script
find . -name "*.pdf" -exec pdmfer -i {} -o processed_{} \
--link "https://secure.example.com" \
--blur Low \;| None | No blur effect applied - original content preserved |
| Low | Subtle blur for mild privacy or aesthetic effect |
| Medium | Moderate blur for general obfuscation |
| High | Strong blur for maximum privacy or visual effect |
Blur effects work by converting PDF content to images and applying Gaussian blur filters.
Custom metadata improves document organization and searchability:
- Title - Document name in PDF viewers and file systems
- Author - Creator attribution
- Subject - Brief description of content
- Keywords - Comma-separated tags for search and categorization
- Uses AES-128 encryption for PDF security
- Protects against unauthorized access
- Compatible with standard PDF viewers
- All JavaScript is embedded within the PDF
- Execution requires JavaScript-enabled viewer
- Follows PDF security standards
- All links must use full URL format (http:// or https://)
- Links are validated before PDF creation
Click to expand troubleshooting guide
1. "Error: Input file does not exist"
- Verify the file path is correct
- Ensure the input file has a
.pdfextension
2. "Error: Link must start with http:// or https://"
- Ensure your link uses the proper protocol
- Example:
https://example.comnotexample.com
3. JavaScript features not working
- Check that your PDF viewer has JavaScript enabled
- Some viewers disable JavaScript for security reasons
4. PDF appears corrupted
- Ensure all required options are provided
- Check file permissions for input and output directories
Use the -v flag for detailed output:
pdmfer -i input.pdf -o output.pdf --link "https://example.com" -vPDmFer is designed for high-performance processing:
- Efficient memory usage for large PDFs
- Optimized processing algorithms
- Multi-library approach for feature compatibility
- Enterprise-grade reliability
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
- Fork the repository
- Create a feature branch
- Submit a pull request
- Ensure all tests pass
PDmFer is available in the public domain. See UNLICENSE.md for details.
PDmFer
PDF phishing at your phingertips