SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a script or some easier way to make printer friendly pages, rather than just making a seperate page for each page I want to be printer friendly?

  2. #2
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes and no.

    If you plan to have more text intensive pages that feel your users may want to print, you're best off to create a seperate page with plain text and maybe your logo at the top.

    In addition, you can place this tag in the HEAD of your Web page - <link rel=alternate media=print href="printversion.doc">

    Make sure to upload your document in Word format with "printversion.doc" being the path and filename. When the user clicks the print button, the linked file will automatically be printed instead of the Web page. Unfortunately, this only works with IE 4+ browsers.

    ------------------
    IMHO,
    Westmich
    ***********************
    Your opportunity on the web is now!
    westmichiganweb.com

  3. #3
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help on this, I guess I will need to stick with the seperate page, as I am doing my best to create a site that supports all browsers. :-)

  4. #4
    SitePoint Guru CJ's Avatar
    Join Date
    Apr 2000
    Location
    Mechelen, Belgium, Europe
    Posts
    684
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take a look at http://freesources.net . I made it that it would be printable. Extra docs are just waste of webspace.

    A good rule is to use percent instead of pixels. Because the amount of pixels you set will exceed the A4 format which makes it not easy to print.

    Christophe

    ------------------
    Freesources.net - the ultimate webmaster resources site
    WebmasterCJ design - opening new worlds for small prices
    Visit the SitePoint Chat!!!

  5. #5
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the idea and also thanks for giving me another great bookmark!

  6. #6
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most of the time when you see a "Print This Page" kind of link to view a printable version of an article (or something related), it's almost always run off of a database. The article text is pulled into the layout of the site with formatting and everything, and the printable version is the same article text pulled from the SAME database, just in a plain old printable layout.

    Manually creating such pages can be a real pain if you have a lot of documents on your site...so you'd be better of either using JavaScript like Christophe (freesources), or using a database solution.



    ------------------
    Chris Bowyer chris@mycoding.com
    MyCoding.com: Visit for Launch Notification!
    DomainMailings.com: Who Says All The Good Ones Are Taken?
    MovieForums.com: Talk About Your Favorite Flicks!

  7. #7
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote/font><HR>Originally posted by TWTCommish:
    Most of the time when you see a "Print This Page" kind of link to view a printable version of an article (or something related), it's almost always run off of a database. The article text is pulled into the layout of the site with formatting and everything, and the printable version is the same article text pulled from the SAME database, just in a plain old printable layout.

    Manually creating such pages can be a real pain if you have a lot of documents on your site...so you'd be better of either using JavaScript like Christophe (freesources), or using a database solution.
    <HR></BLOCKQUOTE>

    Hi,

    I was going to individually create print friendly pages until I read your post.

    How would one go about placing "print friendly" pages into a database so they could be "called up" when necessary?

    What type of code would you use to load the page?

    Thanks,

    WP


  8. #8
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WP,

    Personally I would use PHP pages pulling data from an SQL database. Take a quick gander at Kevin's 10-part tutorial for some more info.

    If you're familiar with using variables in the URL its all very simple.

    Example: a file called "article.php3". Visiting the article.php3 would bring up a list of all the articles on the site...clicking on each one would take you to that article. Each article URL would look something like this:

    article.php3?articleid=87

    That would tell the page to load an article from the database. Which article? Why, the one with an articleid that matches "87" of course! Kevin's tutorial can elaborate on it some more.

    Anyway, you'd use normal HTML in the article.php3 file, but where you would normally place your text/content, you'd use the command to grab the article from the database instead...somewhere in there you could include a link to emailarticle.php3?articleid=$articleid - that last part is a variable, and in this case would create a link to emailarticle.php3?articleid=87

    The emailarticle.php3 file would work the same way, except the HTML before and after the database commands would be plain, without any colors or graphics...thus, a printable version.

    If you understand PHP/SQL it's very simple...if you don't, then take a look at Kevin's series; it's incredibly useful.



    ------------------
    Chris Bowyer chris@mycoding.com
    MyCoding.com: Visit for Launch Notification!
    DomainMailings.com: Who Says All The Good Ones Are Taken?
    MovieForums.com: Talk About Your Favorite Flicks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •