Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Landscape

Status
Not open for further replies.

Papa Bear

Programmer
Feb 1, 2003
37
0
0
GB
I have looked for weeks for an answer to this one. One of my pages shows customer name and address, which the users can then print. As most printers accept envelopes with short edge in first, I want to print landscape. I know I can set the orientation in browser setup, but I am trying to avoid that, giving the users less to do. All the CSS examples I have found do not work across all browsers, so I tried this method adding the following code between <head></head>.
Code:
<style type="text/css" media="print">

.LandscapeDiv{
    filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=1);
}
</style>
This worked, but the output is blured as the text is convered to an image to rotate. I am now trying to open a word document using the following code.
Code:
<%
 Response.Buffer = TRUE
  Response.ContentType = "application/ms-word"
  Response.AddHeader"Content-Disposition", "attachment; filename=envelope.dot"
%>
My question is, Is it possible to open a word document using a template as above which is set to landscape, or is there another way to set the new document to landscape. I have found ways to set the margins. There must be a way to set to landscape!
Also, I never want to save the document. Is there a way to stop the question "Do you want to save" coming out when word is closed?
 
ASP is server side code and as such has no control over what happens client side.

Is there a way to stop the question "Do you want to save" coming out when word is closed?
Not with ASP and as the document loads as a new document in Word there probably isn't in Word either.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top