Printing in landscape mode by default

Rate It (1)

Last post 10-01-2009 1:28 PM by rtpHarry. 1 replies.

Sort Posts:

  • Printing in landscape mode by default

    09-30-2009, 8:58 AM
    • Member
      point Member
    • webadm
    • Member since 09-28-2009, 1:17 AM
    • Posts 6

    I am using Visual Web Developer 2005 Express Edition and  writing Visual Basic code to handle my events.  Is it possible to set the printer mode to default to landscape mode using Visual Basic?  I want to set a particular page to print in landscape mode, but I don’t what the use to have to worry about changing it to landscape mode in the print dialog box, I want it to seemless to the user when they print this information.  Can this done in the On Load event?  What import references are required?

  • Re: Printing in landscape mode by default

    10-01-2009, 1:28 PM
    Answer
    • All-Star
      36,400 point All-Star
    • rtpHarry
    • Member since 10-01-2006, 12:51 PM
    • Lincoln, England
    • Posts 5,882

    Bad news i'm afraid.

    I was going to just say its flat out impossible because you use javascript window.print(); to do it and it just passes the request to the underlying operating system with no config requirements.

    I was also going to point you to the hundreds of other dissapointed developers:

    I did find this thread which seems to discuss the possibility of using CSS print stylesheet to request the orientation of the page, however after a bunch of discussion it turns out that only opera (at the time of writing) supports it.

    The thread is from 2005 so that is a very long time for this situation to have changed. Lets carry on searching...


    ... Ok well I had a bit more of a search but didnt find what I was looking for.

    This page seems to indicate poor support for anything related to printing:

    So dont hold your breath but do have a search for @page size css selector compatibility

Page 1 of 1 (2 items)