A simple PHP-based PDF toolkit built for Linux servers.
This project allows users to merge, split, compress, extract text, and protect PDF files using open-source Linux tools.
- Merge 2 or more PDF files
- Drag & drop reordering before merge
- Extract any single page from a PDF file
- Extract full text from a PDF
- Compress PDF file
- Example: 10MB → 2MB / 500KB (depends on content)
- Protect PDF with password (256-bit encryption using qpdf)
- We can convert multiple images to pdf file. Also able to arrange them.
- We can convert word file(doc/docx) to pdf file. Underhood it will use libreoffice. Make sure libreoffice installed.
Install the following tools on Ubuntu/Debian:
sudo apt update
sudo apt install ghostscript
sudo apt install poppler-utils
sudo apt install qpdf -y
sudo apt install libreofficeEdit your PHP configuration file:
sudo nano /etc/php/YOUR_PHP_VERSION/apache2/php.iniUpdate these values:
upload_max_filesize = 20M
post_max_size = 20M
max_execution_time = 300
memory_limit = 256M
After editing:
sudo systemctl restart apache2Create required folders:
mkdir merge split uploads text_output compressed protectedSet proper permissions:
sudo chmod 755 merge/ split/ uploads/ text_output/ compressed/ protected/- PHP
- Ghostscript
- Poppler-utils (pdfunite, pdftotext, etc.)
- qpdf
- Always validate uploaded files
- Restrict file types to PDF only
- Use
escapeshellarg()when executing shell commands - In production, avoid using
777permissions — use proper ownership instead
Instead of 777 permissions:
sudo chown -R www-data:www-data merge split uploads text_output compressed protected
sudo chmod -R 755 merge split uploads text_output compressed protected- Add automatic file cleanup (cron job)
- Add progress bars for large uploads
- Add drag & drop UI improvements
- Add combined compress + protect tool
- Add Docker support
Built with ❤️ using open-source Linux tools.
⭐ If you like this project, give it a star on GitHub!