473,624 Members | 2,232 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Cur rent.Response.W rite("<script>w indow.print();</script>")

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

Thanks...

Feb 27 '07 #1
1 2511
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******** ************@k7 8g2000cwa.googl egroups.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.Cur rent.Response.W rite("<script>w indow.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
4567
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 - how to get width out to landscape?????? Graphics2D g2d = (Graphics2D)g; //Paper paper = new Paper(); Paper paper = pageFormat.getPaper(); //default portrait width=468 hi=648 x=72 y=72
0
1983
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 - how to get width out to landscape?????? Graphics2D g2d = (Graphics2D)g; //Paper paper = new Paper(); Paper paper = pageFormat.getPaper(); //default portrait width=468 hi=648 x=72 y=72
1
3348
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. But when i print the same report from the application developed in VB.Net the report is printed in potrait. I need to change the default setting to landscape everytime i Print the report. Do i need to pass orientation for each report in front...
3
10595
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 myDocument As PrintDocument = PreparePrintDocument() Dim myPaperSize As PaperSize Dim iSizeCount As Integer Dim dlgPrint As New PrintDialog
0
1816
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 page label document, I get "x" formfeeds and "x" wasted labels. Is there any way to manipulate the .NET printing engine to do a over-under 2-up landscape printing? I'm thinking no, but maybe there's a way. The printer has the ability to sense the...
0
1712
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 the following style sheet with which I was able to print in Landscape mode, if there is no <form> tag on the page. <style type="text/css" media="print"> DIV.page { MARGIN: 10% 0%; WRITING-MODE: tb-rl; HEIGHT: 80% }
4
8743
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
9961
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 printer settings to print. I wanted the print preview to appear the same for all users (i.e. a default page size of 8.5x14 (legal) and portrait mode). Many users have different printers as their default (plotters etc..) and I found that various...
4
2444
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 prints the form in portrait mode, but I want to print the form in landscape mode. What should I do?
0
8177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8629
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1793
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.