Call the built-in ie printing component to complete web printing.

Source: Internet
Author: User

Call the built-in ie printing component to complete the web printing scheme and routine (1)Call the built-in ie printing component to complete the web printing scheme and routine (10.28)

Important:
<Object ID = webbrowser classid = CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2 Height = 0 width = 0 viewastext>
</Object>
<Input type = button value = print onclick = "document. All. webbrowser. execwb (6, 1)" class = "noprint">
<Input type = button value = print onclick = "document. All. webbrowser. execwb (6)" class = "noprint">
<Input type = button value = page setting onclick = "document. All. webbrowser. execwb (8, 1)" class = "noprint">
<Input type = button value = print preview onclick = "document. All. webbrowser. execwb (7,1)" class = "noprint">

Note:
1. CSS control over printing:
<! -- Media = print this attribute can be valid during printing -->
<Style media = print>
. Noprint {display: none ;}
. Pagenext {page-break-after: Always ;}
</Style>

The noprint style makes the print button on the page not appear on the print page. This is very important because it can use the least code to complete the most required functions.

Pagenext styles can be set to pagination. If you need pagination, <Div class = "pagenext"> </div> the page is OK.

2. The line width of the table is set through the style sheet:

<Style>
. TDP
{
Border-bottom: 1 solid #000000;
Border-left: 1 solid #000000;
Border-Right: 0 solid # ffffff;
Border-top: 0 solid # ffffff;
}
. TABP
{
Border-color: #000000;

Border-collapse: collapse;
}
</Style>

Or:

<Style>
. Tdcs1 {
Border: solid windowtext 1.0pt;
}
. Tdcs2 {
Border: solid windowtext 1.0pt; border-left: none;
}
. Tdcs3 {
Border-top: none;
Border-left: solid windowtext 1.0pt;
Border-bottom: solid windowtext 1.0pt;
Border-Right: solid windowtext 1.0pt;
}
. Tdcs4 {
Border-top: none;
Border-left: none;
Border-bottom: solid windowtext 1.0pt;
Border-Right: solid windowtext 1.0pt;
}
. Underline {
Border-top-style: none;
Border-right-style: none;
Border-bottom-style: solid;
Border-left-style: none;
Border-bottom-color: #000000;
}
</Style>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.