/    Sign up×
Community /Pin to ProfileBookmark

I need to print a web page in landscape format (automatically) when the user click a link or button!

Can someone help me?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@angrytunaMar 28.2003 — The window.print() method will print exactly as if the user had clicked the print button. Don't know how landscape mode could be predefined, sorry. Hopefully the above can get you started, at least.

~at
Copy linkTweet thisAlerts:
@AndysonApr 03.2003 — Hi,

i have the same Problem with the print option.

I put the tag in the head of my HTML-Document:

....

<html>

<head>

<title>...</title>

<style type="text/css">

@media print; {

BODY { Size: 8.5in 11in landscape;

Margin: 0.5in; }

}

</style>

...

</head>

<body>

...

<a href="javascript:window.print();"><img src ="../images/printer.jpg"></a>

...

</body>

</html>
------


So the print dialog box appears but the standard is set on Portrait format.

Anything wrong with my code?

I use IE 5.5

I hope that someone can help me.

All the best

Andy
Copy linkTweet thisAlerts:
@AndysonApr 04.2003 — Hey,

i tried it with IE 6.0. It also don't work.

Is my code right or there any mistakes in my Code?

Have you tried it already Dave?

Wich Browserversion dou you have?

Thank you

Andy
×

Success!

Help @ajsfernandes 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,
)...