Quantcast
Channel: Outernet | Discussions - Latest topics
Viewing all articles
Browse latest Browse all 1270

Save Webpage to a pdf

$
0
0

@ki4its wrote:

Here is a quick one line program that will take any webpage and turn it into a pdf file.

Webpage to pdf in one line.
you will need to install wkhtmltopdf for it to work.

Here is the program.

import pdfkit
pdfkit.from_url('http://google.com', 'out.pdf')

Save the above two lines as a .py file

just change the url and the output filename to what you want.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1270

Trending Articles