Collate LODOP the table fill line plus border

LODOP can be output ADD_PRINT_TABLE, ADD_PRINT_HTM, ADD_PRINT_HTML, ADD_PRINT_TBURL and other forms of hypertext, hypertext highly characteristic items or highly automatic pagination of paper more than printing, specifically to see this blog Related Bowen: LODOP in ADD_PRINT_TABLE, HTM, HTML tables Collate test
as Bowen, after ADD_PRINT_HTM automatic paging, can fill line, there is only the second grid lines on the form page.

However, if the table label without border style, all border styles are added to the td, the online side table then the situation will be missing after automatic paging.
The solution is in the table tags Riga border style, good in direct comparison table tag Riga border.
With css styles applied to the table tag can also add border, due to the browser parses, also may be some problems.
Preferably: Riga tag table directly in the border attribute.

In this paper three questions:
1.table automatic paging, paging is not on the edge of the border.
After 2.table Collate extra section below the line.
Riga tag table directly in the border attribute. <table border = "1". . . such.
3.table the form lines are not connected together.
In the tag table Riga cellspacing = "0" cellpadding = " 0" try.
Code:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WEB打印控件LODOP</title>
<script language="javascript" src="LodopFuncs.js"></script>
</head>
<body>
<div id="div1">
<table cellspacing="0" cellpadding="0">
<tr>
    <td>lodop</td>
    <td>c-lodop</td>
    <td>c-lodop</td>
</tr>
<tr>
    <td>text</td>
    <td>html</td>
    <td>html</td>
</tr>
<tr>
    <td>LODOP</td>
    <td>C_LODOP</td>
    <td>HTML</td>
</tr>
</table>
</div>
<div id="div2">
<table cellspacing="0" cellpadding="0" border="1">
<tr>
    <td>lodop</td>
    <td>c-lodop</td>
    <td>c-lodop</td>
</tr>
<tr>
    <td>text</td>
    <td>html</td>
    <td>html</td>
</tr>
<tr>
    <td>LODOP</td>
    <td>C_LODOP</td>
    < TD > the HTML </ TD > 
</ TR > 
</ Table > 
</ div > 
< A the href = "JavaScript: prn1_preview ()" > Table tab Repaired </ A > < br > 
< Script Language = "JavaScript" type = "text / JavaScript" >    
        var LODOP; // declare a global variable 
    function prn1_preview () {
        LODOP=getLodop(); 
        LODOP.PRINT_INIT("");
       var strStyle1="<style>td {border: 1 solid #000000;border-collapse:collapse; }</style>";
       var strStyle2="<style>table,td{border: 1 solid #000000;border-collapse:collapse; }</style>";
       var strHtml=strStyle1+document.getElementById("div1").innerHTML;//td加了border样式
       var strHtml2=strStyle2+document.getElementById("div1") .innerHTML; // TD and table styles added css border style 
       var strHtml3 = strStyle1 + document.getElementById ( " Div2 " ) .innerHTML; // TD added border style, table label itself adds boder = "1" 
        LODOP.ADD_PRINT_HTM ( 10 , 10 , 200 is , 32 , strHTML);
        LODOP.ADD_PRINT_HTM(60,10,200,32,strHtml2);
        LODOP.ADD_PRINT_HTM(120,10,200,32,strHtml3);
        LODOP.PRINT_DESIGN();
        //LODOP.PREVIEW();    
    };
</script> 
</body>

Illustrates
1. Riga border only td, Table without border style, no rear tab edge line.
2. In the table Riga css style, border set, the lower rear edge of the projecting tab has extra portions.
3. In the table directly border attribute tag Riga, td border where also added, normal.


If not occur without an upper edge of tab form, but there are spaces between cells, looks like the same line is not connected, this situation:
1 may be provided cellspacing = "0" cellpadding = in the tag table " 0. "
2. The table also added to the css border style.
3. jerk labels directly to the table border = "", plus cellspacing = "0" cellpadding = " 0".

As shown, the first table border table label itself did not increase, did not increase cellspacing = "0" cellpadding = " 0", only to add td style.
Have found that the foregoing does not add to the tablel tag border, will automatically result in the upper parts of the edge line does, this is not added cellspacing = "0" cellpadding = " 0", resulting in the cell gap, the cell unconnected to the condition occurs.

Code:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WEB打印控件LODOP</title>
<script language="javascript" src="LodopFuncs.js"></script>
<style>table,td {border:solid 1px black;border-collapse: collapse }</style>
</head>
<body>
<div id="div1">
<!--<table cellspacing="0" cellpadding="0" border="1">-->
<table>
<tr>
    <td>lodop</td>
    <td>c-lodop</td>
    <td>c-lodop</td>
</tr>
<tr>
    <td>text</td>
    <td>html</td>
    <td>html</td>
</tr>
<tr>
    <td>LODOP</td>
    <td>C_LODOP</td>
    <td>HTML</td>
</tr>
</table>
</div>
<a href="javascript:prn1_preview()">> <A</Print preview plain text and hypertext stylebr > 
< Script Language = "JavaScript" type = "text / JavaScript" >    
        var LODOP; // declare a global variable 
    function prn1_preview () {
        LODOP=getLodop(); 
        LODOP.PRINT_INIT("");
       var strStyle1="<style>td {border:solid 1px black;border-collapse: collapse }</style>";
       var strStyle2="<style>table,td{border:solid 1px black;border-collapse: collapse  }</style>";
       var strHtml=strStyle1+document.getElementById("div1").innerHTML;
       var strHtml2=strStyle2+document.getElementById("div1").innerHTML;
        LODOP.ADD_PRINT_HTM(10,10,200,32,strHtml);
        LODOP.ADD_PRINT_HTM(60,10,200,32,strHtml2);
        LODOP.PRINT_DESIGN();
        //LODOP.PREVIEW();    
    };
</script> 
</body>

Icon:

 


In this paper, the solid 1px black; 1 solid # 000000 ; and other styles, it seems that what can be written, but some browsers may not recognize.
For example, border: 1 solid # 000000; this, you can view the browser developer mode, see exclamation mark Invalid property value on this property, and the page may not be displayed, although lodop there might be, but it is recommended style with a fairly standard wording . About table style, later we will test some.

Guess you like

Origin www.cnblogs.com/huaxie/p/11004252.html