473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

print in landscape mode

I want a printing properties to be set to landscape mode, so that when
the user click a print button, it will print in landscape mode
automatically.

I use this code in the code-behind of the web form to print the page:
HttpContext.Current.Response.Write("<script>window .print();</script>")

How could I set it to print in landscape mode? Any solution for
this?

Thanks...

Feb 27 '07 #1
1 2495
No, you don't have any control other than window.print over the client-side
printers. You can achieve it with an ActiveX or WSH (Windows Scripting Host)
calls but it will require users to set special security for your site.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
<nu******@yahoo.comwrote in message
news:11********************@k78g2000cwa.googlegrou ps.com...
>I want a printing properties to be set to landscape mode, so that when
the user click a print button, it will print in landscape mode
automatically.

I use this code in the code-behind of the web form to print the page:
HttpContext.Current.Response.Write("<script>window .print();</script>")

How could I set it to print in landscape mode? Any solution for
this?

Thanks...

Feb 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: gilga123 | last post by:
Trying & trying ad infinitum to print page in landscape mode from Java program - orientation is correct landscape but printing width will NOT go to landscape - always prints in portrait mode width...
0
by: gilga123 | last post by:
Trying & trying ad infinitum to print page in landscape mode from Java program - orientation is correct landscape but printing width will NOT go to landscape - always prints in portrait mode width...
1
by: Devesh Aggarwal | last post by:
I developed reports in Crytsal Reports 9.0 in landscape mode. When i print the same from crystal reports it prints perfectly in Landscape even if the printer setting is set to potrait by default. ...
3
by: MarcJ | last post by:
Hello, I can't seem to get printing to landscape working. Here is some of the code I've tried. '--------------------------------------------------------------------------------- Dim...
0
by: Matthew Belk | last post by:
I am trying to print some 2x6 labels on a SATO CL408e thermal label printer. The 2x6 labels are arranged in "landscape" mode with 2 labels per "sheet." When I attempt to print "x" copies of a 1...
0
by: BlueSky | last post by:
Hi, I want to print in Landscape format from an aspx page (when ever the user chooses print from the browser or a print button on the form). I load aspx controls dynamically on the page. I used...
4
by: Deano | last post by:
I'm in the situation of having to print a form - not a report. This will fit nicely in a landscape format but by default it prints portrait. Is there any code to make it play nice?
2
by: Brad Pears | last post by:
I have a vb.net 2005 application and am using the print preview screen. This screen has a printer icon on it that the user can use to print the document currently being viewed. It uses the default...
4
by: sarn555 | last post by:
Dear, I want to print a VB6 form in landscape orientation and it should be done in a running mode. I mean through coding everything must be done at runtime. By default, the Form.PrintForm method...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.