An advanced web application that converts uploaded image files to a single PDF document with professional features and format support.
- Upload multiple image files at once
- Support for 10+ image formats: PNG, JPG, JPEG, BMP, TIFF, WEBP, GIF, ICO, TGA, PSD
- Drag and drop interface
- Real-time file preview with format-specific icons
- Advanced PDF settings (Quality, DPI, Optimization)
- Automatic format detection and correction
- Transparent image support (RGBA to RGB conversion)
- Image optimization and compression
- Responsive design
- File size validation (max 16MB per file)
- Maximum 20 files per conversion
- Backend: Python 3.12+ with built-in HTTP server
- PDF Conversion: Pillow (PIL) library
- Frontend: HTML5, CSS3, JavaScript
- Image Processing: Pillow (PIL)
- Clone the repository:
git clone <repository-url> cd pngpdfconvert- Install Python dependencies:
# For standalone version (minimal dependencies) pip install Pillow # For Flask version (full features) pip install -r requirements.txt- Run the application:
# Standalone version (recommended) python3 standalone_converter.py # Flask version (requires additional setup) python3 app.py- Open your browser and navigate to:
- Standalone:
http://localhost:9000 - Flask:
http://localhost:5000
- Standalone:
- Open the web application in your browser
- Drag and drop image files onto the upload area or click to select files
- Review the uploaded files in the file list
- (Optional) Click "Settings" to adjust PDF quality, DPI, and optimization
- Click "Convert to PDF" to generate the PDF
- The PDF will be automatically downloaded
- Quality: Adjust PDF compression (10-100%)
- DPI: Set resolution for print quality (72, 150, 300 DPI)
- Optimization: Enable file size optimization
- Format Detection: Automatic format correction for files without extensions
Each image format is processed with specialized algorithms:
- PNG: Transparency handling, palette conversion, quality preservation
- JPEG: Compression optimization, quality control
- BMP: Lossless to optimized conversion
- TIFF: Multi-page support, high-quality processing
- WEBP: Modern format optimization
- GIF: Animation handling, transparency support
- ICO: Multi-size icon processing
- TGA: Transparency and color space handling
- PSD: Layer flattening, transparency support
pngpdfconvert/ ├── standalone_converter.py # Main Python application (recommended) ├── app.py # Flask version (optional) ├── simple_converter.html # Client-side only version ├── requirements.txt # Python dependencies ├── templates/ │ └── index.html # Flask HTML template └── static/ ├── css/ │ └── style.css # CSS styles └── js/ └── script.js # JavaScript functionality - Python 3.7+
- Pillow (PIL) library
This application can be easily deployed to platforms like:
- Heroku
- Render
- PythonAnywhere
- DigitalOcean App Platform
For production deployment, consider using the Flask version (app.py) with proper WSGI server.
- Standalone Version (
standalone_converter.py): Uses Python's built-in HTTP server, no external dependencies except Pillow - Flask Version (
app.py): Full Flask application with img2pdf library - Client-Side Version (
simple_converter.html): HTML-only version (limited functionality)
This project is open source and available under the MIT License.