Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<html>
2
<head>
3
<title>html2ps/html2pdf CSS 3 Compatibility List</title>
4
<link rel="stylesheet" type="text/css" medial="all" title="Default" href="css/help.css"/>
5
</head>
6
<body>
7
<h1>html2ps/pdf CSS 3 Compatibility List</h1>
8
 
9
<p><a href="index.html">Back to table of contents</a></p>
10
 
11
<h2 id="media">Media parameters</h2>
12
<p>
13
CSS 3 paged media module provides a means of controlling media size and margins.
14
html2ps understangs 'size' and 'margin' properties when they're used in @page context; thus,
15
you can set page size and margins in your CSS file, overriding defaults. For example:
16
<pre>
17
@page {
18
  size: 100mm 200mm;
19
  margin: 10mm;
20
}
21
</pre>
22
or
23
<pre>
24
@page {
25
  size: A4 landscape;
26
  margin: 5% 10mm;
27
}
28
</pre>
29
</p>
30
<p><a href="http://www.w3.org/TR/css3-page/#page-size">More complete information on 'size' and 'margin' value formats</a> is available on w3c.org.</p>
31
 
32
 
33
<h2 id="marginboxes">Margin boxes</h2>
34
<p>
35
html2ps supports margin boxes in accordance to CSS 3. For example, you may render a header
36
using the following CSS code:
37
<pre>
38
@page {
39
  @top-left {
40
    content: &quot;My Page&quot;;
41
  }
42
  @top-right {
43
    content: &quot;Page &quot; counter(page) &quot; of &quot; counter(pages);
44
  }
45
}
46
</pre>
47
</p>
48
<p>
49
As an extension of the margin box specification, html2ps provides '-html2ps-html-content'
50
property. In general, it is similar to 'content' property, except the resulting string
51
is processed by HTML parser. Thus, you may use HTML tags in this property value.
52
<pre>
53
@page {
54
  @top-left {
55
    -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;;
56
  }
57
  @top-right {
58
    content: &quot;Page &quot; counter(page) &quot; of &quot; counter(pages);
59
  }
60
}
61
</pre>
62
</p>
63
<p>
64
Note that you may set text formatting using usual CSS propeties in margin box context:
65
<pre>
66
@page {
67
  @top-left {
68
    color: red;
69
    content: &quot;My Page&quot;;
70
  }
71
  @top-right {
72
    content: &quot;Page &quot; counter(page) &quot; of &quot; counter(pages);
73
  }
74
}
75
</pre>
76
</p>
77
<p>
78
For further information please refer to
79
<a href="http://www.w3.org/TR/css3-page/#margin-boxes">CSS 3 Paged Media Module</a>.
80
</p>
81
 
82
<h2 id="footnotes">Footnotes</h2>
83
 
84
<h2 id="properties">Properties</h2>
85
 
86
<table>
87
<thead>
88
<tr>
89
<th>Property</th>
90
<th>Support</th>
91
<th>Note</th>
92
</tr>
93
</thead>
94
 
95
<tbody>
96
<tr>
97
<td></td>
98
<td></td>
99
<td></td>
100
</tr>
101
 
102
</tbody>
103
</table>
104
 
105
html2ps/pdf (c) <a href="http;//www.tufat.com/">TUFaT.com</a>
106
</body>
107
</html>