dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Is it possible to change the print orientationon a visitor's browser from a web page

  1. #1
    Join Date
    Oct 2004
    Posts
    2

    Cool Is it possible to change the print orientationon a visitor's browser from a web page

    I have an image that is too large to print as portrait. I have seen ideas of using CSS to accomplish the task at hand. The problem is the CSS code when compiled shows the image/content on the web page in Landscape which is not suitable for a professional website. I have suggested making the images smaller to fit that of a portrait orientation and have the client print it from a printer friendly page but that option was shot down. Creating a jsp include page that would contain the content/images for each page was also a no no. Is there any other option. Please, your input would be greatly appreciated.

  2. #2
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    I'd suggest having a look at the paged media documentation in the official CSS2 specification.

  3. #3
    Join Date
    Aug 2004
    Location
    US
    Posts
    544
    look into this:
    http://www.alistapart.com/articles/goingtoprint

    it explains the print style sheet which you could edit around to do what you want

  4. #4
    Join Date
    Oct 2004
    Posts
    2
    Thanks alot for your help...I was able to accomplish the task but I have one small problem...

    having the writing-mode attribute in the body of the style sheet (see option#1) doesn't seem to work at preview for print. It will only work if I place it as part of the SPAN (see option#2). I would like it to work for all content and images in the body of the page.

    OPTION#1
    @media print {
    body { font-family: serif; margin-left: 5cm; margin-right: 3cm; writing-mode: tb-rl; }
    span.speaker { font-weight: bold;}
    }

    OPTION#2
    @media print {
    body { font-family: serif; margin-left: 5cm; margin-right: 3cm; writing-mode: tb-rl; }
    span.speaker { font-weight: bold;}
    }

    Does any one know why?

  5. #5
    Join Date
    Aug 2004
    Location
    US
    Posts
    544
    first option 1 & 2 are the same ;P

    also, writing-mode is CSS3, is it not? most browsers wont recognize it either if im not mistaken

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles