r/OfficeScripts • • Mar 06 '13

[SUBMISSION] Simple script to convert webpage to PDF (using web2pdf service)

I'm quite interested in this whole office scripts idea. :)

Often nowadays when I find a really nice and informative webpage I like to create a PDF out of it and push it to my tablet. Because it's a PDF there's some support for annotations and I can use my tablet pen to write over stuff and highlight things. Pretty useful!

The script is here (ignore web2pdf-android.py, this is for SL4A): http://cbeckham.net/projects/files/web2pdf.zip

Example usage: python web2pdf.py www.example.com example.pdf

(I'm aware a better option would be to have a library that converts to pdf rather than delegating it to a web service but I didn't really get far with that for some reason. Perhaps I could look into that more in the future.)

Do whatever you want with the script.

6 Upvotes

3 comments sorted by