Printerfriendly webpage

Discussion in 'XML' started by rene.castberg@gmail.com, Sep 14, 2005.

  1. Guest

    Hi,

    I have some webpages where i use xsl to display an xml document in the
    web browser.
    The problem arrises when i try to print the page, the images are too
    large and the print out looks aweful.
    What i would like to do is create a link on each page which points to a
    printer friendly version.
    I need some way of specifying which xsl file to use depending on
    whether its a print version or to be displayed. I found out that the
    browser i use doesn't support the media entry in the stylesheet
    refference.
    Can anybody point me to a site where i can get an example on how to
    achieve this.

    Any help would be appreciated.

    René Castberg
     
    , Sep 14, 2005
    #1
    1. Advertisements

  2. wrote:

    > I have some webpages where i use xsl to display an xml document in the
    > web browser.
    > The problem arrises when i try to print the page, the images are too
    > large and the print out looks aweful.
    > What i would like to do is create a link on each page which points to a
    > printer friendly version.
    > I need some way of specifying which xsl file to use depending on
    > whether its a print version or to be displayed. I found out that the
    > browser i use doesn't support the media entry in the stylesheet
    > refference.


    One way to do this could be the use of a parameter after the url, which
    then can be read out to decide which markup file is to load depending
    on its value.

    See eg
    PHP's $QUERY_STRING
    Javascript's location.search.substring(1)
    Perl's $ENV{QUERY_STRING}
    etc

    --
    Bart
     
    Bart Van der Donck, Sep 14, 2005
    #2
    1. Advertisements

  3. Guest

    Thanks, i'll look into that.

    René
     
    , Sep 15, 2005
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Bokma
    Replies:
    5
    Views:
    5,430
    John Bokma
    Sep 10, 2003
  2. Patrick
    Replies:
    1
    Views:
    618
  3. Ryan Haskell
    Replies:
    6
    Views:
    8,463
    Ryan Haskell
    Jun 25, 2004
  4. Jurjen de Groot

    Implement a Print button on ASP.NET webpage.

    Jurjen de Groot, Jun 25, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    25,991
    Joe Agster
    Jun 25, 2003
  5. Replies:
    1
    Views:
    678
  6. Paul
    Replies:
    14
    Views:
    1,180
    Alexey Smirnov
    Jun 19, 2008
  7. sifar
    Replies:
    5
    Views:
    706
  8. soren625
    Replies:
    2
    Views:
    659
    soren625
    Dec 12, 2006
Loading...