https://github.com/zeshuaro/telegram-pdf-bot
A Telegram bot that can do a lot of things related to PDF files
https://github.com/zeshuaro/telegram-pdf-bot
bot pdf-manipulation python python-telegram-bot telegram telegram-bot telegram-pdf-bot
Last synced: 3 months ago
JSON representation
A Telegram bot that can do a lot of things related to PDF files
- Host: GitHub
- URL: https://github.com/zeshuaro/telegram-pdf-bot
- Owner: zeshuaro
- License: agpl-3.0
- Created: 2017-07-17T07:44:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-11T10:17:20.000Z (3 months ago)
- Last Synced: 2025-04-11T11:58:34.796Z (3 months ago)
- Topics: bot, pdf-manipulation, python, python-telegram-bot, telegram, telegram-bot, telegram-pdf-bot
- Language: Python
- Homepage: https://t.me/pdfbot
- Size: 46.1 MB
- Stars: 203
- Watchers: 6
- Forks: 99
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Telegram PDF Bot
[](https://t.me/pdfbot)
[](https://github.com/zeshuaro/telegram-pdf-bot/blob/master/LICENSE)
[](https://github.com/zeshuaro/telegram-pdf-bot/actions/workflows/github-actions.yml)
[](https://codecov.io/github/zeshuaro/telegram-pdf-bot)
[](https://app.codacy.com/gh/zeshuaro/telegram-pdf-bot/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://github.com/astral-sh/ruff)
[](https://crowdin.com/project/telegram-pdf-bot)
[](https://t.me/pdf2botdev)
[](https://github.com/ebertti/awesome-telegram)[](https://github.com/sponsors/zeshuaro)
[](https://www.buymeacoffee.com/zeshuaro)
[](https://ko-fi.com/zeshuaro)
[](https://liberapay.com/zeshuaro/)
[](https://patreon.com/zeshuaro)
[](https://paypal.me/JoshuaTang)A Telegram bot that can:
- Compress, crop, decrypt, encrypt, merge, preview, rename, rotate, scale and split PDF files
- Compare text differences between two PDF files
- Create PDF files from text messages
- Add watermark to PDF files
- Add text layers to PDF files to make them searchable with text
- Extract images and text from PDF files
- Convert PDF files into images
- Beautify handwritten notes images into PDF files
- Convert webpages and images into PDF files[](https://www.digitalocean.com/?refcode=4991e58bfd21&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes
### Setup Database
The bot uses [Datastore](https://cloud.google.com/datastore) on Google Cloud Platform (GCP). Create a new project on GCP and enabble Datastore in the project. Install the [gcloud CLI](https://cloud.google.com/sdk/) and run `gcloud init` to initialise it with your project.
### OS Requirements
Ubuntu
```sh
apt-get install poppler-utils libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info
```macOS
```sh
brew install libxml2 libxslt poppler cairo pango gdk-pixbuf libffi
```### Install dependencies
This project uses [Poetry](https://python-poetry.org/) as the dependency manager, run the following command to install the dependencies:
```sh
poetry install --no-root
```### Compile the translation files
Run the following command to compile all the translation files:
```sh
pybabel compile -D pdf_bot -d locale/
```### Setup Your Environment Variables
Copy the `.env` example file and edit the variables within the file:
```sh
cp .env.example .env
```### Running The Bot
You can then start the bot with the following command:
```bash
python -m pdf_bot
```