A bot for PDF for doing Many Things....

Overview

Telegram PDF Bot

Typing SVG

Telegram Bot MIT License Code style: black Crowdin Telegram Channel

Readme Card

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
  • Multiple languages support
  • 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

Repo Special 😅

What's Special in this repo & To-Do's ???

  • Make It Heroku Deployable
  • Add Detailed Guide to get GCP Credentials
  • Add Private Use Feature
  • Add Password feature 🔑 for private use
  • Remove GCP and use another free Cloud Storage.
    • Add Broadcasting Feature
  • Make it more stable and fast

Mandatory Vars....

DEV_TELE_ID - Your Telegram ID.
TELE_TOKEN - Telegram Bot Token get from @BotFather
GOOGLE_APPLICATION_CREDENTIALS - Your GCP Credentials get from Google Cloud 

Where To Get The Mandatory Vars..

DEV_TELE_ID - Get it from Thunder Bot by sending /id

TELE_TOKEN - Get it from @BotFather

GOOGLE_APPLICATION_CREDENTIALS - Get it from Google Cloud ☁️

Optional Vars....

STRIPE_TOKEN - Stripe.com token for receiving Donations.
SLACK_TOKEN - slack.com api token to recieve Feedbacks on Slack.com if not entered you will recieve in your Telegram 

Where To Get The Optional Vars...

STRIPE_TOKEN - Get it from stripe.com

SLACK_TOKEN - Get it from slack.com

Installation [ ⚠️ Click On Any Topic To Get it's Detailed Information ⚠️ ]

Getting GCP Ceredinials ⚠️ Important ⚠️

Getting Started

These instructions will get you a copy of the project up.

Setup Database

The bot uses Datastore on Google Cloud Platform (GCP).

Sir/Ma'am, Kindly 🤗 follow the below steps to create a valid GCP Credentials File :-

  1. Firstly Go to https://console.cloud.google.com/project
  2. Create a Project.
  3. Open http://console.developers.google.com/project/_/apiui/credential And Click on Create Ceredinials then Click on Service Account.
  4. Enter all the required values. [At the Service Accounts, enter a Service account name and click Create. For Service account permissions, select Project, Owner.]
  5. Select a service account. Click the 3 skewer bar and select Create Key. Select JSON, click Create.
  6. Click Create. The credential file will be downloaded to your local computer or Any Device your are Using.
  7. Upload the Project Credential file to the bots private repo.
  8. Then Open https://console.cloud.google.com/datastore/setup .
  9. And enable the FireStore Database.
  10. Now open https://console.cloud.google.com/iam-admin/iam .
  11. And set the service account's role to owner. Note: If you can't see your service account in the list click on Add and add your service account with Owner as Role.
  12. Now Deploy your bot and set GOOGLE_APPLICATION_CREDENTIALS var with value as the File Name of the Ceredinials Json you uploaded in the repo in Step 7.
  13. Congratulations 🎉 your bot has been Successfully Started 😊 So enjoy 🤗 .
⚠️ I will Recommend you to Use Only Google Chrome for generating Ceredinials Json as some browsers will not start the Download of the Json file in the Step 6 ⚠️

Don't Forget to Star 🌟 Repo if ❤️ The Repo and Follow Me to show your ❤️ .

The Easy Way (Heroku)

Follow these steps for a successful deployment.....

  • Star the repo 😅 and import it as Private.
  • Upload your GCP Credentials in the root directory with name GCP_FILE.json
  • Click on the Below Deploy Button

Deploy

  • Enter the Ceredinials and Click in deploy.
  • After Deployment Completed Click on Manage App & Turn on the Dynos....
  • Booyah!! Your PDF Bot is successfully started.
  • Enjoy the Bot 🥳 .

Deploy using GitHub Workflows.....

  • Star the repo 😅 and import it as Private.
  • Upload your GCP Credentials in the root directory with name GCP_FILE.json
  • Go to Project->Settings->Secrets and Click New repository secret and Add All the following Vars as the Repository Secrets.

HEROKU_API_KEY: Your Heroku Account API

HEROKU_APP_NAME : Heroku App Name

HEROKU_EMAIL : Your Heroku Email 📨 Id

DEV_TELE_ID : Your Telegram ID.

TELE_TOKEN : Telegram Bot Token get from @BotFather

GOOGLE_APPLICATION_CREDENTIALS : Your GCP Credentials get from Google Cloud

  • Go To The Actions Tab and Choose Manually Deploy To Heroku and click on run workflow.

Follow me if Love ❣️ the repo.

Local Host

OS Requirements

Ubuntu

apt-get install poppler-utils libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info

macOS

brew install libxml2 libxslt poppler cairo pango gdk-pixbuf libffi

Setup Virtual Environment

Create a virtual environment with the following command:

virtualenv venv
source venv/bin/activate

Bot Requirements

Run the following command to install the required packages:

pip install -r requirements.txt

Compile the translation files

Run the following command to compile all the translation files:

pybabel compile -D pdf_bot -d locale/

Setup Your Environment Variables

Copy the .env example file and edit the variables within the file:

cp .env.example .env

Running The Bot

You can then start the bot with the following command:

python bot.py

Follow me if Love ❣️ the repo.

Follow me if Love ❣️ the repo.

Found a Bug 🐛

Feel free to create a pull or create a issue now and describe your issue freely.

Credits

Owner
Mr. Developer
Telegram Bot 🤖 Developer Alone 😔 Open Source ❤️ Learning From Mistakes 😃
Mr. Developer
Zen-Knit is a formal (PDF), informal (HTML) report generator for data analyst and data scientist who wants to use python.

About Zen-Knit: Zen-Knit is a formal (PDF), informal (HTML) report generator for data analyst and data scientist who wants to use python. Inspired fro

Zen Reportz 27 Jul 13, 2022
A bot for PDF for doing Many Things....

Telegram PDF Bot A Telegram bot that can: Compress, crop, decrypt, encrypt, merge, preview, rename, rotate, scale and split PDF files Compare text dif

Mr. Developer 60 Dec 27, 2022
Simple HTML and PDF document generator for Python - with built-in support for popular data analysis and plotting libraries.

Esparto is a simple HTML and PDF document generator for Python. Its primary use is for generating shareable single page reports with content from popular analytics and data science libraries.

Dom 76 Dec 12, 2022
rst2pdf: Use a text editor. Make a PDF.

rst2pdf: Use a text editor. Make a PDF.

rst2pdf 487 Jan 06, 2023
minipdf is a package for creating simple, single-page PDF documents.

minipdf minipdf is a package for creating simple, single-page PDF documents. Installation You can install the development version from GitHub with: #

mikefc 41 Dec 19, 2022
Simple pdf editor while preserving structure and format.

SIMPdf Simple pdf editor while preserving structure and format.

Shashwat Singh 242 Jan 04, 2023
Converting Html files to pdf using python script, pdfkit module and wkhtmltopdf.

Html-to-pdf-pdfkit-wkhtml- This repository has code for converting local html files and online html resources into pdf. It is an python script which u

Hemachandran P 1 Nov 09, 2021
A simple pdf size compressing telegram robot witten in python.

Pdf Compressor Telegram Bot ##About : A simple pdf size compressing telegram robot witten in python. Mostly useful for digital documentation. Deploy t

Renjith Mangal 22 Oct 28, 2022
Python PDF Parser (Not actively maintained). Check out pdfminer.six.

PDFMiner PDFMiner is a text extraction tool for PDF documents. Warning: As of 2020, PDFMiner is not actively maintained. The code still works, but thi

Yusuke Shinyama 4.9k Jan 04, 2023
A tool for certificate PDF generation.

certificate-pdf-generator 获奖证书PDF批量生成工具 | a Tool for certificate PDF generation. ⚠️ 下载前请注意 本项目使用了LFS来存储PDF等大文件。在克隆或下载本仓库前,请先使用apt等包管理器安装git-lfs包。如果已经克

Wanghao Xu 4 Nov 28, 2022
Svg2pdfgen - Svg To PDF gen with python

Svg2pdfgen - Svg To PDF gen with python

Robert Urbańczyk 3 May 30, 2022
Program that locks/unlocks pdf files🐍

🐍 📄 PDFtools 📄 🐍 Programa que bloqueia/desbloqueia arquivos pdf Requisitos • Como usar • Capturas de Tela 🚨 Aviso 🚨 Altere os caminhos referente

João Victor Vilela dos Santos 1 Nov 04, 2021
Table automatically extraction from PDF Document

PDF Table Extractor Table automatically extraction from PDF Document Our Icon 📌 Name : PDF Table Extractor 📌 Authors : Minku Koo Jiyong Park 📌 Deve

1 Jan 10, 2022
Produce pdf in python backend from simple bootstrap vue frontend and download to browser

vollmacht produce pdf in python backend from simple bootstrap vue frontend and download to browser Frontend in one file with bootstrap-vue (allthough

Otto 1 Nov 08, 2020
Convert Lecture Videos to PDF

Convert Lecture Videos to PDF Description Want to go through lecture videos faster without missing any information? Wish you can read the lecture vide

Emilio Kartono 20 Nov 25, 2022
Trata PDF para torná-lo compatível com PDF/X e com impressoras em escala de cinza.

tratapdf Trata PDF para torná-lo compatível com PDF/X e com impressoras em escala de cinza. dependências icc-profiles ghostscript visualizador de PDF

1 Nov 30, 2021
Python script that split PDF files.

Automatic PDF Splitter This script can create new single-page PDFs files from multipaged PDFs. Requirements Python 3.0+ # Debian distros sudo apt-get

Leandro Padula 5 Apr 02, 2022
pdf_sprinkles: sprinkles text in your PDFs

pdf_sprinkles: sprinkles text in your PDFs pdf_sprinkles remotely OCRs a PDF with Google Cloud Document AI, and returns the result as a PDF with searc

Will Angley 2 Dec 17, 2021
Python bindings for MuPDF's rendering library.

PyMuPDF 1.19.3 Release date: December 15, 2021 On PyPI since August 2016: Author Jorj X. McKie, based on original code by Ruikai Liu. Introduction PyM

Jorj X. McKie 0 Nov 03, 2022
Compare-pdf - A Flask driven restful API for comparing two PDF files

COMPARE-PDF A Flask driven restful API for comparing two PDF files. Description

Karthikeyan JC 3 Mar 13, 2022