Thanks to visit codestin.com
Credit goes to github.com

Skip to content

umpolungfish/PDmFer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDmFer

THE PDF EMBEDDING POWERHOUSE

pdmfer logo

Python   PDF   CLI   License

Overview • Features • Installation • Usage • Examples • Security • Contributing



OVERVIEW

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.

THE PIPELINE


PDmFer:

  1. TAKES your input PDF document
  2. EMBEDS interactive elements (download redirects, JavaScript, metadata)
  3. APPLIES visual effects (blur) and security (password protection)
  4. 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.


INSTALLATION

PREREQUISITES

  • Python 3.8 or higher
  • pip package manager
  • Virtual environment (recommended)

SETUP STEPS

1. CLONE THE REPOSITORY

git clone <repository-url>
cd pdmfer

2. CREATE VIRTUAL ENVIRONMENT

python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. INSTALL DEPENDENCIES

pip install -r requirements.txt
pip install -e .

QUICK START

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"

FEATURES

CORE CAPABILITIES

  • Download redirects embedded in PDFs
  • Custom link integration for interactive documents
  • Password protection with AES-128 encryption
  • Custom metadata (Title, Author, Subject, Keywords)
  • Blur effects (None, Low, Medium, High)
  • Custom messages for pre-download redirects
  • Enterprise-grade error handling
  • File-based workflow for easy integration

ADVANCED FEATURES

  • Cross-platform support (Windows, macOS, Linux)
  • High-performance optimized processing
  • Verbose mode for detailed logging
  • Batch processing support
  • Security controls with JavaScript embedding
  • Link validation ensuring proper URL formats
  • Multi-library approach for feature compatibility
  • Efficient memory usage for large PDFs

USAGE

BASIC SYNTAX

pdmfer -i input.pdf -o output.pdf --link "https://example.com" [options...]

OPTIONS REFERENCE

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

EXAMPLES

BASIC OPERATIONS

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"

ADVANCED OPERATIONS

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 \;

CORE CONCEPTS

BLUR EFFECTS EXPLAINED

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.

METADATA CUSTOMIZATION

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

SECURITY CONSIDERATIONS

PASSWORD PROTECTION

  • Uses AES-128 encryption for PDF security
  • Protects against unauthorized access
  • Compatible with standard PDF viewers

JAVASCRIPT SECURITY

  • All JavaScript is embedded within the PDF
  • Execution requires JavaScript-enabled viewer
  • Follows PDF security standards

LINK VALIDATION

  • All links must use full URL format (http:// or https://)
  • Links are validated before PDF creation

TROUBLESHOOTING

COMMON ISSUES

Click to expand troubleshooting guide

1. "Error: Input file does not exist"

  • Verify the file path is correct
  • Ensure the input file has a .pdf extension

2. "Error: Link must start with http:// or https://"

  • Ensure your link uses the proper protocol
  • Example: https://example.com not example.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

VERBOSE MODE

Use the -v flag for detailed output:

pdmfer -i input.pdf -o output.pdf --link "https://example.com" -v

PERFORMANCE

PDmFer is designed for high-performance processing:

  • Efficient memory usage for large PDFs
  • Optimized processing algorithms
  • Multi-library approach for feature compatibility
  • Enterprise-grade reliability

CONTRIBUTING

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Improve documentation

CONTRIBUTING STEPS

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request
  4. Ensure all tests pass

LICENSE

PDmFer is available in the public domain. See UNLICENSE.md for details.



PDmFer

PDF phishing at your phingertips

Releases

No releases published

Packages

No packages published

Languages