DEV Community

Anton MegaPort
Anton MegaPort

Posted on

How to convert web page by URL to PDF file using telegram bot.

cover


First you need to run the bot MegaPort https://t.me/megaport_bot . Next, go to the application “Web browser” by tapping on /APP2

pic 1

The first thing you need to do is go to the app’s settings:

pic 2

By default the view mode is “Screenshots”.
You need to change it and tap /SET1.

pic 3

Then choose PDF file.

pic 4

The view mode has been changed to the PDF file.

pic 5

Go back to the Web pages menu.

pic 6

Next, go to the Enter page URL menu

pic 7

Then, enter the desired page URL, such as this:

pic 8

After that, the bot will queue your request for processing and you will receive a corresponding notification:

pic 9

If there are few requests in the queue - your request will be processed quickly, if not - you will have to wait for a while for the bot to process all the requests before yours. As soon as the bot fulfills your request, you will receive a notification:

pic 10

After that, you need to go back to the Web pages menu
You’ll see the URL of the page in the header
and a new Receive PDF file menu item:

pic 11

When you tap it, you’ll able to download and view the PDF file.

pic 12

Top comments (0)