html docx js header and footer

Solutions on MaxInterview for html docx js header and footer by the best coders in the world

showing results for - "html docx js header and footer"
Sara
18 Jul 2020
1<html>
2<head>
3    <style type="text/css">
4    @page Section1 {
5        margin:0.75in 0.75in 0.75in 0.75in;
6        size:841.7pt 595.45pt;
7        mso-page-orientation:landscape;
8        mso-header-margin:0.5in;
9        mso-header: h1;
10        mso-footer-margin:0.5in;
11        mso-footer: f1;
12    }
13
14    div.Section1 {page:Section1;}
15
16    p.headerFooter { margin:0in; text-align: center; }
17    </style>
18</head>
19<body><div class=Section1>
20
21
22<!-- header/footer:
23  This element will appears in your main document (unless you save in a separate HTML),
24  therefore, we move it off the page (left 50 inches) and relegate its height
25  to 1pt by using a table with 1 exact-height row
26-->
27<table style='margin-left:50in;'><tr style='height:1pt;mso-height-rule:exactly'>
28    <td>
29      <div style='mso-element:header' id=h1>
30        <p class=headerFooter>
31            Header content goes here
32         </p>
33      </div>
34      &nbsp;
35    </td>
36
37    <td>
38      <div style='mso-element:footer' id=f1>
39        <p class=headerFooter>
40        Page
41        <span style='mso-field-code:PAGE'></span>
42        of
43        <span style='mso-field-code:NUMPAGES'></span>
44      </p>
45      </div>
46      &nbsp;
47</td></tr></table>
48
49Main content goes here.
50Here's a page break:
51<br clear=all style='mso-special-character:line-break; page-break-before:always'>
52This is page 2
53
54</div></body>
55</html>