473,657 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

printing in landscape automatically

52 New Member
Dear sir,

I have trouble with printing page with landscape. I am using java script to print the page. as well as I have set css file to print landscape but it is not working.

I have used these line in css files,

[HTML]<style type="text/css">
<!--
@page { size: landscape; }
-->
</style>
[/HTML]
it automatically takes the portrait (default one), but I wish to print landscape automatically. please assist me.

Regards,
Faruk Chowdhury
Sep 7 '08 #1
6 5587
acoder
16,027 Recognized Expert Moderator MVP
You have to set the media property to "print".
Sep 7 '08 #2
farukcse
52 New Member
Dear Sir,
Thanks for your reply.
i set the media property with print but it does not work.
so can you give me other suggesation?

Regards,
faruk Chowdhury
Sep 8 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Which browser(s) are you testing on?
Sep 8 '08 #4
farukcse
52 New Member
Dear Sir,
i am tesiting on internet explorer version 6.0 .

Thanks in advance .

Faruk
Sep 15 '08 #5
farukcse
52 New Member
Dear Sir,
i am tesiting on internet explorer version 6.0 .

Thanks in advance .

Faruk
Sep 15 '08 #6
acoder
16,027 Recognized Expert Moderator MVP
Do you want this to work only in IE6? I don't think IE6 supports the @page property, so you can try using this hack (hacks for IE - tell me something new)
Sep 15 '08 #7

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

Similar topics

2
3012
by: Darcy Kahle | last post by:
I am trying to do some advanced printing in python using the win32ui module, and have run into an issue. I need to print a page landscape. As I could not determine how to specify the orientation of the printing, I arranged the graphic elements on the page the way it should be. When I got to printing text, it went across the page, not down as I need it to go. I tried to use the hDC.SetWorldTransform(0, -1, 1, 0, 0, 0) command to rotate...
4
4845
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been selected. For example, if I were to have 5 pages with every second page printing, I would get the following results: Page 1 = Print OK Page 2 = Blank Page 3 = Print OK Page 4 = Blank
2
7129
by: Chris Beall | last post by:
I have a table (yes, it's a REAL table...) that is quite wide. Even with a small font selected, it won't fit on a portrait mode letter page. Rather than leave the user to figure out how to print it in landscape mode, I'd like to do that for him, so when the UA Print function is invoked, the page is automatically printed in landscape mode. I tried adding: @media print { @page {size: landscape} }
3
10597
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
5
10123
by: Patrick De Ridder | last post by:
How can I turn what I want to print 90 degrees using the logic below? Please tell me the code with which to make the modification. Many thanks, Patrick. using System.ComponentModel; using System.Drawing; using System.Drawing.Printing; using System.IO;
5
6843
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.
3
31886
by: D Witherspoon | last post by:
No matter what I do the default paper size is always either A3 or 11 by 8.5 .. Here is the code. Dim dlg As DialogResult pd.DocumentName = "Weld Image" Dim pkPaperSize As New Printing.PaperSize("sdfgsfdg", 850, 1100)
2
9962
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...
2
4383
by: satnamsarai | last post by:
it is possible to change page orientation to landscape from asp.net page? I am using window.print() dialog to print a page and I would like that page to print automatically in landscape view.
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8829
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
8508
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
6172
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
5633
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
4164
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...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
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.