Quote:
I have read the article from this URL http://www.boxesandarrows.com/view/printing_the_web, and it seems like I can use CSS to do it, but I still have no idea about it yet.
You misunderstand the article. Let’s say I am at a webpage, with all this text in the middle. There’s ad banners, pretty pictures, backgrounds, and what not too. When I print the page, I just want the text. I don’t want color backgrounds, ink intensive ads, and so on. CSS allows you to target stylesheets at specific media (screen, text to speech readers, and printers). So the article is essentially telling you to create a stylesheet, targeted for print, that restyles the page in a manner appropriate for printing.
While that rule of thumb still applies to you, it actually doesn’t deal with your question. You want to, given a page, take the contents of that page, and every page it links to, take the contents, and put them together. This is no longer in the realm of HTML and CSS, which are client side, structural markup and stylesheet languages. In your case, you have some arbitrary logic to follow. You need to write a computer program that runs on the server to do this.
Now, if you don’t already have an idea of what language you might use, etc., at this point I would say, you can’t accomplish your idea.