1<html> 2<head> 3<title>html2ps/html2pdf directives</title> 4<link rel="stylesheet" type="text/css" medial="all" title="Default" href="css/help.css"/> 5</head> 6<body> 7<h1>html2ps/pdf directives</h1> 8<a href="index.html">Back to table of contents</a> 9<h2>Page-breaking commands</h2> 10<p> You can force a page break by inserting any one of the following commands 11 into the HTML page: 12<pre> 13<!--NewPage--> 14<pagebreak/> 15<?page-break> 16</pre> 17 18<p> It is highly NOT RECOMMENDED to use these directives inside table cells, as 19 you can get unpredictable results. 20 21<h2>Special fields</h2> 22 23<p>Note that these fields are processed by separate filter 24(<a href="api.html#filter-pre-html2ps-fields">PreTreeFilterHTML2PSFields</a>). 25If you're using HTML2PS API, you should install this filter using the following code: 26<pre> 27pipeline->pre_tree_filters[] = new PreTreeFilterHTML2PSFields(); 28</pre> 29 30<table> 31<tbody> 32<tr class="odd"> 33<th>Name</th> 34<th>Replaced with</th> 35</tr> 36 37<tr class="even"> 38<td>##PAGE##</td> 39<td>Number of current page</td> 40</tr> 41 42<tr class="odd"> 43<td>##PAGES##</td> 44<td> 45Total number of pages in the generated PDF file. Note that this directive 46will show number of pages in current source file when the script is run in batch mode. 47</td> 48</tr> 49 50<tr class="event"> 51<td>##FILENAME##</td> 52<td>Filename (URL) of the source HTML</td> 53</tr> 54 55<tr class="odd"> 56<td>##FILESIZE##</td> 57<td>Size of the source file (without included files)</td> 58</tr> 59 60<tr class="event"> 61<td>##TIMESTAMP##</td> 62<td>Date/time the PDF file have been generated</td> 63</tr> 64 65</tbody> 66 67</body> 68</html> 69