/    Sign up×
Community /Pin to ProfileBookmark

javascript print in landscape

Hi All,
I have a webpage written in c# asp.net. The page has a datagrid and a print button. The print button has the javascript onclick=”javascript:window.print();”

I want to be able to change the print preference to LandScape.
I tried using CSS but because I have a datagrid its not working. CSS works if I don’t have the datagrid.
This is kinda urgent.

Thanks

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@LeeUNov 14.2007 — I believe that is a setting that must be changed by the user.
Copy linkTweet thisAlerts:
@srivaauthorNov 14.2007 — Hi All,

I have a webpage written in c# asp.net. The page has a datagrid and a print button. The print button has the javascript onclick="javascript:window.print();"

When I push the button, It opens the Print dialogue box.

I want the script to change the Orientation to Landscape.

By default the preference of the Orientation is Potrait.

I tried using CSS but because I have a datagrid on the page its not working. CSS works if I don't have the datagrid.

This is kinda urgent.

Thanks


This is an internal site and the users them selves want it.
×

Success!

Help @sriva spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...