A unified web application that combines beautiful PDF viewing capabilities with hilarious PDF transformation features! Built with modern web technologies and Python backend processing.
- Beautiful PDF Rendering: View PDFs with the same stunning UI from PDF-Tweaker
- Interactive Controls: Navigate pages, zoom in/out, and view page information
- Drag & Drop: Simply drag PDFs onto the viewer area
- Responsive Design: Works perfectly on desktop and mobile devices
- Visual Enhancements: Subtle visual effects and overlays for a polished experience
- Multiple Humor Styles: Choose from Mild, Spicy, or Chaotic humor levels
- Customizable Options: Control cat insertions, emoji sprinkling, and more
- AI Integration: Optional OpenAI-powered text rewriting (requires API key)
- Random Cat Images: Automatically inserts random cat images throughout the PDF
- Real-time Processing: See processing status and download results instantly
- Node.js (v16 or higher)
- Python 3.8 or higher
- pip (Python package manager)
-
Clone the repository
git clone <your-repo-url> cd Noob_Coderz
-
Install Python dependencies
pip install -r requirements.txt
-
Install Node.js dependencies
npm install
-
Start the server
npm start
-
Open your browser Navigate to
http://localhost:3000
- Click the "📖 PDF Viewer" tab
- Upload a PDF file using the file picker or drag & drop
- Navigate through pages using the arrow buttons
- Use zoom controls to adjust the view
- Keyboard shortcuts: Arrow keys for navigation, +/- for zoom
- Click the "🎭 Funny PDF Generator" tab
- Select a PDF file to transform
- Choose your preferred humor style:
- Mild: Gentle, family-friendly humor
- Spicy: Moderate chaos and fun
- Chaotic: Maximum chaos and hilarity
- Customize options:
- Insert cats every N paragraphs
- Enable/disable emojis
- Enable/disable random cat images
- Optional AI rewriting (requires OpenAI API key)
- Click "🎭 Generate Funny PDF!"
- Download your transformed PDF when ready!
Create a .env file in the root directory:
# Server configuration
PORT=3000
PYTHON_BIN=python3
# OpenAI API (optional, for AI rewriting feature)
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4o-miniIf you're on Windows or have multiple Python versions, you can specify the Python executable:
PYTHON_BIN=python
# or
PYTHON_BIN=C:\Python39\python.exe- Frontend: Modern HTML5, CSS3, and vanilla JavaScript with ES6 modules
- Backend: Node.js/Express server with Python integration
- PDF Processing: Python scripts using pdfplumber, FPDF2, and Pillow
- Styling: Beautiful gradient-based design with Poppins font
- PDF.js: Client-side PDF rendering for the viewer
Noob_Coderz/
├── public/
│ └── index.html # Main unified website
├── PDF-Tweaker/ # PDF.js library files
│ ├── pdf.mjs
│ └── pdf.worker.mjs
├── server.js # Node.js backend server
├── funnyify.py # Python PDF transformation script
├── requirements.txt # Python dependencies
├── package.json # Node.js dependencies
└── README.md # This file
The website uses CSS custom properties (variables) for easy theming. Modify the :root section in the HTML file to change colors and gradients.
Edit the STYLES dictionary in funnyify.py to adjust the intensity levels for different humor styles.
The Python script can be extended to add more transformation features like:
- Different image types (not just cats)
- Custom text replacements
- Layout modifications
- Additional visual effects
-
Python not found
- Ensure Python is installed and in your PATH
- Set
PYTHON_BINenvironment variable to the correct Python executable
-
PDF processing fails
- Check that all Python dependencies are installed
- Ensure the PDF file is not corrupted or password-protected
- Check server logs for detailed error messages
-
Port already in use
- Change the
PORTenvironment variable - Kill any processes using port 3000
- Change the
-
AI features not working
- Verify your OpenAI API key is set correctly
- Check that the
OPENAI_API_KEYenvironment variable is set - Ensure you have sufficient API credits
Enable debug logging by setting the DEBUG environment variable:
DEBUG=true- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
- PDF.js: For client-side PDF rendering capabilities
- pdfplumber: For PDF text extraction
- FPDF2: For PDF generation
- Pillow: For image processing
- Express.js: For the web server framework
Happy PDF fun-making! 🎉📄