GenAI PDF Bot is a Telegram-based automation system for handling common PDF operations directly inside chat.
The bot focuses on simplicity, speed, and lightweight document processing without requiring users to install desktop software.
Supported workflows include:
- Image to PDF conversion
- PDF merging
- PDF compression
- Watermark insertion
- Password protection
All operations are processed dynamically and delivered instantly through Telegram.
Telegram User → Telegram Bot API → Python Processing Engine → PDF/Image Processing Modules → File Response Delivery
The architecture is intentionally lightweight and stateless.
- Convert multiple images into a single PDF
- Supports sequential image uploads
- Optimized RGB conversion
- Combine multiple PDF files
- Maintains page ordering
- Fast in-memory processing
- Reduce PDF file size
- Powered by PyMuPDF
- Optimized for lightweight delivery
- Dynamic text watermarking
- Adjustable transparency
- Page-wise overlay support
- Password encryption support
- Secure PDF locking
- Lightweight encryption workflow
Telegram Client ↓ Telegram Bot API ↓ Python Bot Engine ↓ PDF Processing Layer ↓ Generated File Response
Upload PDFs → Temporary File Storage → Merge Engine → Output Generation → Auto Cleanup
Upload Images → RGB Conversion → PDF Generation → Delivery to User
- Async Telegram bot handlers
- Stateless request processing
- Temporary file cleanup system
- Modular utility functions
- Environment-variable-based secret management
- Render deployment support
GenAIPDF-bot/
│
├── GenAIPDF.py
├── requirements.txt
├── .env
├── .gitignore
└── assets/
└── logo.pnggit clone https://github.com/ankushx01-dev/GenAIPDF-bot.git
cd GenAIPDF-bot
pip install -r requirements.txt
python GenAIPDF.pyBOT_TOKEN=YOUR_TELEGRAM_BOT_TOKENSensitive values should never be committed publicly.
Build Command:
pip install -r requirements.txtStart Command:
python GenAIPDF.pyEnvironment Variables:
BOT_TOKEN=- Lightweight processing pipeline
- Automatic temporary file cleanup
- Minimal memory overhead
- Async Telegram event handling
- Optimized PDF processing flow
- OCR support
- AI document summarization
- Cloud file storage
- Multi-language support
- Queue-based processing
- Usage analytics dashboard
Contributions are welcome.
If you want to improve features, optimize processing, or extend the bot with new PDF utilities, feel free to open a pull request.
The project structure is modular and designed for scalability.
Ankush Rana
Email rajputx000@gmail.com
LinkedIn https://www.linkedin.com/in/ankush-rana-x01
GitHub https://github.com/ankushx01-dev
GenAI PDF Bot simplifies document processing into a single Telegram conversation.
Fast workflows. Minimal friction. Direct utility.
