[thelist] HTML files print to one HTML file

Christian Heilmann lists at onlinetools.org
Thu Feb 24 13:55:48 CST 2005


Ellen Kanner wrote:

> Does anyone have an example of how they've taken an HTML directory of 
> files to and put them into one printable HTML file?
>
> All of which is activated when a user clicks a link?  It takes the 
> index page as the first page, and subsequent pages are pulled in.
>
> Let me know if you need more explanation.
>
> Is there a Javascript for this?  Php?
>
Definitely not Javascript, as it is a server side issue. The question is 
not how to pull them in but how to create the printable version? A 
printable version should only have the page content, and none of the 
navigation and footers and other annoyances. Therefore you'd need to be 
able to identify the content of the page some way.
A lot of  templating solutions use some comment for that, fe. <!-- 
contentstart --> and <!-- contentend --> and grab everything in between 
via a regular expression.

Also, in which order should the files be assembled to one big document? 
Alphabetically? Newest one first? After all, the printable document 
should serialise in a logical manner....





More information about the thelist mailing list