Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Print envelope

Reply
Thread Tools

Print envelope

 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      06-27-2005
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
 
Reply With Quote
 
 
 
 
David C
Guest
Posts: n/a
 
      06-27-2005
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


 
Reply With Quote
 
 
 
 
David
Guest
Posts: n/a
 
      06-27-2005

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 ***
 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      06-27-2005
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
 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      06-28-2005
Gazing into my crystal ball I observed "David C"
<(E-Mail Removed)> writing in
news:(E-Mail Removed):

> 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
 
Reply With Quote
 
David
Guest
Posts: n/a
 
      06-30-2005
I have never used the @ sign in CSS. What does it do?

David



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
David
Guest
Posts: n/a
 
      06-30-2005
Also, it needs to be landscape print.

David



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      07-01-2005
Gazing into my crystal ball I observed David <(E-Mail Removed)> writing
in news:(E-Mail Removed):

> 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
 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      07-01-2005
Gazing into my crystal ball I observed David <(E-Mail Removed)> writing
in news:#2VMH$(E-Mail Removed):

> 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
 
Reply With Quote
 
David
Guest
Posts: n/a
 
      07-01-2005
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 ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to create envelope from given source because the root element is not named Envelope cxc Java 0 05-20-2005 10:02 PM
Print Envelope and Cheque System MEMDB Computer Information 2 01-17-2005 04:18 AM
Print Envelope and Cheque System MEMDB Computer Information 0 12-07-2004 03:41 PM
Print Envelope and Cheque System MEMDB Computer Information 0 09-19-2004 05:18 AM
Print Envelope and Cheque System MEMDB Computer Information 0 08-05-2004 02:38 AM



Advertisments