473,794 Members | 2,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to print a web page in landscape mode automatically

1 New Member
I have to print a web page in landscape mode automatically when print is given. i dont want to go to settings and change the mode manually each time. help is needed
Jul 30 '10 #1
2 3788
Atli
5,058 Recognized Expert Expert
The @page size CSS style would be the way to do that, although I'm not sure this is a widely supported method. I know of no other way though.

Expand|Select|Wrap|Line Numbers
  1. @page {
  2.   size: A4 landscape;
  3. }
Jul 30 '10 #2
Niheel
2,456 Recognized Expert Moderator Top Contributor
Because javascript usually call's the browsers Print function and from there you have to choose landscape it would be hard to do set the printer to Landscape.

There are solutions, but they are browser specific.
Aug 3 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1408
by: microsoft | last post by:
I have a issue. I need to create a command line application that will take 2 parameters and will print to the default printer without any popups. the first parameter is the html file name(location) second is a switch that will tell the app to print in landscape or protrait. Basicly I when I type in (for example) PrintApp "c:\printthis.html" \L it should print the file printthis.html in landscape. I have tried everything and I have some apps...
0
1576
by: tupolev | last post by:
Hi, I have a pricelist that I want to print in landscape. I also tried to set the pagesettings in the printpage event but still no effect. What is wrong ????? private sub btn1_click PrintDocument1.DefaultPageSettings.Landscape = True PrintDocument1.Print()
5
6874
by: cpopham | last post by:
I tried posting earlier and it never showed up.. I have a simple program to print a text file. I need to know how to change the page settings to landscape if it is not already in ladnscape mode. I do not want to use a dialog to do it and this appears the only way you can do it. I just need it to spit out the print in landscape orientation. Why is this so hard to do for something that should be easy.
0
1724
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% }
1
2529
by: nuhura01 | last post by:
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?
4
2461
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?
1
1614
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, How can print data report in landscape mode./ Thanx >> ALI <<
2
2454
by: chpadmamca | last post by:
Below is my html code, is there any way to print this document in landscape mode wih CSS? <html><head><style type="text/css"> table.fixed {table-layout:fixed; width:100%; border-collapse: collapse; word-wrap:break-word;}TR.head{font-family: verdana; font-size: 10pt; vertical-align: top ; color: #ffffff; background-color: black; font-weight: bold; }TR.data{font-family: verdana; font-size: 8pt; vertical-align:...
2
2540
Claus Mygind
by: Claus Mygind | last post by:
For my intranet web app we use exclusively FireFox as our browser. I have a report I want to format in the landscape mode and would like to include that code in the print button I display for the user. If it is possible could you please show some sample code?
0
9519
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
10435
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10163
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,...
0
9037
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
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
6779
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
5436
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
4113
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
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.