Skip to content

morninj/web2pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web2pdf

Convert webpages to PDFs for offline reading.

Installation

First, install PhantomJS.

Second, clone this repository:

$ git clone https://github.com/morninj/web2pdf.git

Third, add web2pdf to your path:

$ cp screenshot.js /usr/local/bin/
$ cp web2pdf.py /usr/local/bin/web2pdf
$ chmod +x /usr/local/bin/web2pdf

Use

Archive a Single URL

$ web2pdf -u http://www.nytimes.com/

This will save the page as archive.pdf. You can change the default filename:

$ web2pdf -u http://www.nytimes.com/ -o nytimes.pdf

Archive Multiple URLs

Create a file named input.txt (or anything else) with one URL per line, like this:

http://www.nytimes.com/
http://news.ycombinator.com/
http://www.reddit.com/

Then, run:

$ web2pdf -f input.txt

This will save each page in a new folder named archives. You can also change the name of the folder:

$ web2pdf.py -f input.txt -d my_folder

About

Convert webpages to PDFs for offline reading

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published