Create a printer friendly page from multiple html files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daydreaming
    New Member
    • Jan 2008
    • 12

    Create a printer friendly page from multiple html files

    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 http://www.boxesandarr ows.com/view/printing_the_we b, 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.

    Cheers,
  • oler1s
    Recognized Expert Contributor
    • Aug 2007
    • 671

    #2
    I have read the article from this URL http://www.boxesandarr ows.com/view/printing_the_we b, 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.

    Comment

    • gits
      Recognized Expert Moderator Expert
      • May 2007
      • 5390

      #3
      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

      Comment

      Working...