Once I was asked to read Swift docs and give a demo on the same. As you can see this docs is only HTML and no PDF version is available. It's itching to read HTMLs for a long time, and I personally prefer PDFs. Wanted to fetch all the doc pages and convert it to PDF. Here's how we can easily (read 'naive') do it using pdfkit.
with open("swift_links.txt") as f:
links = f.read().split("\n")
for each_link in links:
filename = str(filecount)+".pdf"
filecount = filecount+1
P.S: swift_links.txt is my local file which has all the relevant links from the docs URL. How to extract links from a webpage? Different story ~ read here.
P.P.S: Have never checked about the copyright issue. Never transport the PDF unless you're quite sure it doesn't violate their policies.
Want to merge these files? Check it out here.