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. Advertising

  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. Advertising

  3. Guest

    Thanks, i'll look into that.

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

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,092
    John Bokma
    Sep 10, 2003
  2. Replies:
    1
    Views:
    393
  3. Paul
    Replies:
    14
    Views:
    814
    Alexey Smirnov
    Jun 19, 2008
  4. sifar
    Replies:
    5
    Views:
    378
  5. soren625
    Replies:
    2
    Views:
    349
    soren625
    Dec 12, 2006
Loading...

Share This Page