By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,678 Members | 1,146 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,678 IT Pros & Developers. It's quick & easy.

Print envelope

P: n/a
We have a classic ASP intranet web site that has been around for a while.
Our customer wants to be able to print an envelope from the contact name and
address table. We have other reports that we display and print from the
HTML generated by our ASP code, but have not been able to find any way to
format a page and print to an envelope. Can anyone help? Thanks.

David
Jul 22 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
David C wrote:
We have a classic ASP intranet web site that has been around for a while.
Our customer wants to be able to print an envelope from the contact name and
address table. We have other reports that we display and print from the
HTML generated by our ASP code, but have not been able to find any way to
format a page and print to an envelope. Can anyone help? Thanks.

David


Print it where? on the server or client? Unless you are just saying you
want to layout the HTML so that the user can print the site/page? If so
you will really want to get away from that. Look at using a third party
addin/component like Crystal to format printings and such.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Jul 22 '05 #2

P: n/a

Yes, at the client. This client is very restricted and all people have
Microsoft Word and all are using IE6. Does that help?

David
*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #3

P: n/a
David wrote:
Yes, at the client. This client is very restricted and all people have
Microsoft Word and all are using IE6. Does that help?

David
*** Sent via Developersdex http://www.developersdex.com ***


Not really...I mean you have almost zero ability to do things on the
client, its a fundamental for security. Without a third party
control/component on the client you are limited to just formatting the
HTML result... you can do some with StyleSheets(CSS) and such, to show
it differently but in the end there is only so much you can tweak.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Jul 22 '05 #4

P: n/a
Gazing into my crystal ball I observed "David C"
<dl*****@lifetimeinc.com> writing in
news:Oa*************@tk2msftngp13.phx.gbl:
We have a classic ASP intranet web site that has been around for a
while. Our customer wants to be able to print an envelope from the
contact name and address table. We have other reports that we display
and print from the HTML generated by our ASP code, but have not been
able to find any way to format a page and print to an envelope. Can
anyone help? Thanks.

David


You could try a little CSS:

<style type="text/css">
@media screen {
body {font-size:100%;}
}
@media print
{
@page {width:9.5in; height:4.125in}
body {width:8.5in; height:3.125in; font-size:10pt}
div#address {margin-left:5in}
..noprint {display:none}
}
</style>
</head>
<body>
<p class="noprint">Hit the print button on your browser to print this
record</p>
<div id="address">
<%=addressinfo%>
</div>
</body>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #5

P: n/a
I have never used the @ sign in CSS. What does it do?

David

*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #6

P: n/a
Also, it needs to be landscape print.

David

*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #7

P: n/a
Gazing into my crystal ball I observed David <da***@lifetime.com> writing
in news:eV**************@TK2MSFTNGP12.phx.gbl:
I have never used the @ sign in CSS. What does it do?

David

*** Sent via Developersdex http://www.developersdex.com ***


@media print
{
/* tells the UA this is for printing */
}
@page
{
/* tells the printer what kind of paper to use */
}
@media aural
{
/* used for screen readers and such, although most of them use IE's
rendering engine and ignore it :.( */
}

http://www.w3.org/TR/REC-CSS2/media.html#q1
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #8

P: n/a
Gazing into my crystal ball I observed David <da***@lifetime.com> writing
in news:#2*************@TK2MSFTNGP15.phx.gbl:
Also, it needs to be landscape print.

David


http://www.w3.org/TR/REC-CSS2/page.html#page-size-prop

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #9

P: n/a
Below is my test page and it does not print in landscape.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>

<style TYPE="text/css">
<!--
.startpos {
position: absolute;
width: 350px;
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 18px;
top: 120px;
left: 300px;}

.verticaltext {writing-mode: tb-rl; filter: fliph flipv;}

@media screen {
body {font-size:100%;}
}
@media print
{
@page rotated {size: landscape; width:9.5in; height:4.125in}
body {width:8.5in; height:3.125in; font-size:10pt}
div#address {margin-left:4in; margin-top:1.75in; font-size: 16px}
..noprint {display:none}
}
-->
</style>

</head>
<body>
<p class="noprint">Hit the print button on your browser to print this
record</p>
<div id="address">
David Chase<br>
LifeTime Computing, Inc.<br>
5960 W. Brown Deer Rd.<br>
Brown Deer, WI&nbsp; 53223-2310
</div>

</body>
</html>

David

*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #10

P: n/a
Gazing into my crystal ball I observed David <da***@lifetime.com> writing
in news:OG*************@TK2MSFTNGP09.phx.gbl:
Below is my test page and it does not print in landscape.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
<head> <meta http-equiv="Content-Type" content="text/html;
charset=utf-8"> <title></title>

<style TYPE="text/css"> <!--
.startpos {
position: absolute;
width: 350px;
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 18px;
top: 120px;
left: 300px;}

verticaltext {writing-mode: tb-rl; filter: fliph flipv;}

@media screen {
body {font-size:100%;}
}
@media print
{
@page rotated {size: landscape; width:9.5in; height:4.125in}
body {width:8.5in; height:3.125in; font-size:10pt}
div#address {margin-left:4in; margin-top:1.75in; font-size: 16px}
.noprint {display:none}
}
-->
</style>

</head>
<body>
<p class="noprint">Hit the print button on your browser to print this
record</p> <div id="address">
David Chase<br>
LifeTime Computing, Inc.<br>
5960 W. Brown Deer Rd.<br>
Brown Deer, WI&nbsp; 53223-2310
</div>

</body>
</html>

David


This is not a server side issue - this is a client side CSS issue, better
discussed at comp.infosystems.www.authoring.stylesheets. Follow-ups set.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.