2

It happens alot that I face a web page just containing a table of content linking to the "real pages" (like this or this web page) – and I wanted to collect all those pages to save them in a single document (i.e. the TOC and the content linked from there). Is there any program doing this?

If it is not clear yet, this is an example of webpage output I would like to have.

I don’t care much about OS as I have Linux and Windows.

Why I am interested in this? It is much easier to print or read documents in e-reader with this method.

  • 2
    Calibre is capable of that – available for free and cross-platform (Python). You can collect all pages linked from a TOC together with the TOC, and have them saved in one of many formats – e.g. EPUB/PDF/HTML. Would that fit? – Izzy Feb 12 '16 at 19:51
  • tnx 4 edits. I dont care much about OS as I have Linux and windows both.Do I need to add? if no, question is fine as it is. Didnt know Calibre is capable of it.Is there any instruction to do it in Calibre? will make a try. tnx – Woeitg Feb 12 '16 at 19:53
  • 2
    There's a pretty extensive documentation on the site I've linked to. I use Calibre to produce my eBooks (offline), where I had documents spreading over multiple files and it did fine. Never tried it online myself, but it should work there as well. AFAIR you can limit it to "stay on the site and not go up" – so you don't end up with the entire Internet in one document ;) – Izzy Feb 12 '16 at 19:58
2
+50

This is how you do it with calibre.

Steps:


Step 1:

Mirror the site that you wish to convert into PDF.

You may use any of the website mirroring software. I have use the IDM website Grabber. This gave me the contents of the complete website.

enter image description here

Step 2:

Once that is done, Open up Calibre and Click on Add books (1).

enter image description here

In the Windows that opens up, point Calibre to the Table Of Contents or the main page that contains all the other pages in the folder.

In this case, we choose the gawk_toc.html (2) and click on the Open Button (3).

enter image description here

Step 3:

Now click on the enter image description here button on the menu bar.

In the Windows that opens up, select an output format. In our case, PDF. (4)

enter image description here

Click on the PDF output (5) button on the left menu and select an appropriate font size (6) and (7). In this case I had to set this as 8 px to make it look appropriate. You can experiment with different font sizes. But for this document I recommend 8 px.

enter image description here

Click on the OK Button (8). This will start the conversion Process. You will obtain the output after a few seconds. Click on the PDF link to open it.

enter image description here

  • great answer, thanks. Can you share the final pdf as an example? – Woeitg May 7 '16 at 16:07
  • @Woeitg Sure. Should I attach example images or should I share the entire PDF online? – Aswin P J May 7 '16 at 16:08
  • If you can share the entire pdf, it is better – Woeitg May 7 '16 at 16:11
  • Download the converted PDF from here drive.google.com/file/d/0B_x1XHnzpYiWV3RHd0tqbU96ZDA/… – Aswin P J May 7 '16 at 16:12
  • @Woeitg Calibre You can change the fonts, layouts , margins etc if you wish to using Calibre. Also the hyperlinks within the PDF work. You can click on the table of contents to take you to the section. – Aswin P J May 7 '16 at 16:14
1

This can be done with Adobe Acrobat that allows copying both the ToC and its links:

Convert a web page to PDF Choose File > Create > PDF from Web Page. Alternatively, choose Tools > Create PDF > Web Page.

Enter the complete path to the web page, or click Browse and locate an HTML file.

To change the number of levels in the website to convert, click Capture Multiple Levels. Enter the number of levels to include, or select Get Entire Site to include all levels from the website.

Note: Some websites have hundreds or even thousands of pages. Converting a large website can make your system slow and unresponsive, and can even use up available hard drive space and memory, causing a system crash. It’s a good idea to begin by downloading one level of pages and then go through them to find particular links to download.

If Get Only N Level(s) is selected, select one or both of the following options: Stay On Same Path

Downloads only web pages subordinate to the specified URL.

Stay On Same Server

Downloads only web pages stored on the same server.

Click Settings/Advanced Settings , change the selected options in the Web Page Conversion Settings dialog box as needed, and click OK.

Click Create.

Note: You can view PDF pages while they are downloading; however, you cannot modify a page until the download process is complete.

You do not need to wait for the conversion to complete before adding more requests. While a conversion is in progress, you can convert another page to PDF and that gets added to the queue. The number of requests in the queue are indicated by the Pending Conversions field in the Download Status dialog box.

Source: https://helpx.adobe.com/acrobat/using/converting-web-pages-pdf.html

  • Do you know if it can be done in Linux? – Woeitg May 1 '16 at 19:55
  • 1
    @Woeitg: you said you could use Windows and Linux but you're asking for Linux now? – Thomas Weller May 1 '16 at 20:12
1

This can be done online: http://www.verypdf.com/online/site-to-pdf-converter.php

This page converts a webpage with links into a pdf. It has a free trial - but subscription, if you want to keep it.

0

HTTrack Website Copier is an open source website archiving utility that can download an entire website in the form of an offline archive on your local drive. It recursively builds all directories of the website (and/or mirror websites) and fetches its content, which can also be updated later on. HTTrack can therefore be quite handy for saving exact copies of entire websites and their mirror sites on a local folder. This can also help web masters avoid using a FTP connection for downloading copies of a website, as they can quickly do so with the help of this tool. Furthermore, it’s a cross platform application and is available for both Windows and Linux.

Archiving a website with HTTrack is easy. In the first step, enter a project name, category and specify a destination folder. The default directory for saving files is C:\My Web Sites. Click Next to proceed.

WinHTTrack Website Copier

Once done, select a downloading method and enter a URL in the URL box. The available actions for downloading content include download website(s), download website(s) + questions, get separated files, download all sites in pages (multiple mirror), continue interrupted downloads and update existing downloads. Once you have specified both the action and URL, click Next.

You can either set application to disconnect the connection or shutdown the PC after the website downloading process finishes. In case you wish to immediately download the website content, then do not select the “save setting only” option and click Finish.

Remote Acces Connection

This will start downloading the website content to specified destination folder.

HTTrack Website Copier works on Windows XP, Windows Vista, Windows 7, Linux and Unix based operating systems.

Source

  • I cannot try this program now, maybe if somebody is interested take a look and let me know about it. – Woeitg May 2 '16 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.