File size: 1,993 Bytes
07c3cdd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<html>
<head>
<title>html2ps/html2pdf CSS 3 Compatibility List</title>
<link rel="stylesheet" type="text/css" medial="all" title="Default" href="css/help.css"/>
</head>
<body>
<h1>html2ps/pdf CSS 3 Compatibility List</h1>

<p><a href="index.html">Back to table of contents</a></p> 

<h2 id="marginboxes">Margin boxes</h2>
<p>
html2ps supports margin boxes in accordance to CSS 3. For example, you may render a header
using the following CSS code:
<pre>
@page {
  @top-left {
    content: &quot;My Page&quot;;
  }
  @top-right {
    content: &quot;Page &quot; counter(page) &quot; of &quot; counter(pages);
  }
}
</pre>
</p>
<p>
As an extension of the margin box specification, html2ps provides '-html2ps-html-content' 
property. In general, it is similar to 'content' property, except the resulting string 
is processed by HTML parser. Thus, you may use HTML tags in this property value. 
<pre>
@page {
  @top-left {
    -html2ps-html-content: &quot;&amp;lt;span style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;My&amp;lt;/span&amp;gt; Page&quot;;
  }
  @top-right {
    content: &quot;Page &quot; counter(page) &quot; of &quot; counter(pages);
  }
}
</pre>
</p>
<p>
Note that you may set text formatting using usual CSS propeties in margin box context:
<pre>
@page {
  @top-left {
    color: red;
    content: &quot;My Page&quot;;
  }
  @top-right {
    content: &quot;Page &quot; counter(page) &quot; of &quot; counter(pages);
  }
}
</pre>
</p>
<p>
For further information please refer to
<a href="http://www.w3.org/TR/css3-page/#margin-boxes">CSS 3 Paged Media Module</a>.
Note that html2ps at the moment does not support setting page size and margins via CSS.
</p>

<h2 id="footnotes">Footnotes</h2>

<h2 id="properties">Properties</h2>

<table>
<thead>
<tr>
<th>Property</th>
<th>Support</th>
<th>Note</th>
</tr>
</thead>

<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>

</tbody>
</table>

html2ps/pdf (c) <a href="http;//www.tufat.com/">TUFaT.com</a> 
</body>
</html>