By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,398 Members | 1,362 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,398 IT Pros & Developers. It's quick & easy.

Create a printer friendly page from multiple html files

P: 12
Hi all,

I need some help. I have the index html page which has many <a> tags linking to other html pages. There is a need to create the printer friendly page by putting the contents of index file and also other html files in a single page without using Javascript.

I have read the article from this URL, and it seems like I can use CSS to do it, but I still have no idea about it yet.

Can any one give me some example how to do it? Thank you for any help in advance.

Jun 8 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 671
I have read the article from this URL, 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.
Jun 9 '08 #2

Expert Mod 5K+
P: 5,390
i think your best bet would be to create a pdf-document that contains all the content at serverside ... you might use PHP, JSP or any other serverside language for this. I'm not quite sure whether some XML/XSLT-magic could be used here alternativly to create PDF or something similar?

kind regards
Jun 9 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.