Spaces:
Sleeping
Sleeping
File size: 8,352 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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | <html>
<head>
<title>html2ps/html2pdf configuration files and options</title>
<link rel="stylesheet" type="text/css" medial="all" title="Default" href="css/help.css"/>
</head>
<body>
<h1>html2ps/pdf configuration files and options</h1>
<p><a href="index.html">Back to table of contents</a></p>
<p>Currently, configuration is done both via configuration file (<tt>html2ps.config</tt>)
and configuration constants inside the <tt>config.inc.php</tt> file.
<h2><a name="common"></a>html2ps.config, Common configuration options</h2>
<table class="description_table">
<caption><p>Common directives in <tt>html2ps.config<br>
</tt></p></caption>
<tr class="odd">
<th style="width: 10%;">Option</th>
<th style="width: 10%;">Appears at</th>
<th style="width: 90%;">Description</th>
</tr>
<tr class="even">
<td><tt>media</tt></td>
<td>Top level</td>
<td> Defines the output media size. This tag should have three arguments:
<ul>
<li><tt>name</tt> – media name; you'll be able to refer to this media
by name while calling the script;</li>
<li><tt>width</tt> – media width in millimetres;</li>
<li><tt>height</tt> – media height in millimetres.</li>
</ul>
</td>
</tr>
</table>
<h2><a name="postscript"></a>html2ps.config, Postscript and Ghotscript configuration</h2>
<table class="description_table">
<caption><p>Postscript-specific directives in <tt>html2ps.config<br></tt></p>
</caption>
<tr class="odd">
<th style="width: 10%;">Option</th>
<th style="width: 10%;">Appears at</th>
<th style="width: 90%;">Description</th>
</tr>
<tr class="even">
<td><tt>fonts</tt></td>
<td>Top level</td>
<td>Contains information about font-family value to Postscript font name mappings.
See descrripton of nested directives.</td>
</tr>
<tr class="odd">
<td><tt>family</tt></td>
<td>/fonts</td>
<td>Contains information about particular font-family value mapping. Attributes:
<ul>
<li><tt>name</tt> – value of 'font-family' property being mapped.</li>
</ul>
</td>
</tr>
<tr class="even">
<td><tt>encoding-override</tt></td>
<td>/fonts, /fonts/family</td>
<td>Contains information about exceptions in font-family mappings. Attributes:
<ul>
<li><tt>name</tt> – comma-separated list of encodings to apply this rule
for.</li>
</ul>
For example, normally 'times' family is mapped to /Times-Roman font. On
the other hand, this standard font does not contain cyrillic symbols, so
when one of the cyrillic encodings is met, 'times' will be mapped to /TimesCyr-Medium.</td>
</tr>
<tr class="odd">
<td><tt>alias</tt></td>
<td>/fonts</td>
<td>List of font-family aliases. Attributes:
<ul>
<li><tt>alias</tt> – font family alias to be translated</li>
<li><tt>family</tt> – real font family name for this alias</li>
</ul>
Note that alias resolving is done once, so there's not much use of constructions
similar to
<pre>
<alias alias="verdana" family="arial"/>
<alias alias="arial" family="helvetica"/>
</pre>
</td>
</tr>
<tr class="even">
<td><tt>metrics</tt></td>
<td>/fonts</td>
<td>
Reference to a font metric file for this font family. Attributes:
<ul>
<li><tt>typeface</tt> – typeface name (refers to the ones used in <tt>normal</tt>,
<tt>italic</tt> and <tt>oblique</tt> attributes)</li>
<li><tt>file</tt> – name of the font metric (AFM) file (searched in TYPE1_FONT_REPOSITORY directory)</li>
</ul>
</td>
</tr>
<tr class="odd">
<td><tt>normal</tt></td>
<td>/fonts/family, /fonts/family/encoding-override, /encoding-override</td>
<td>System font names for normal font variant. Attributes:
<ul>
<li><tt>normal</tt> – font name for roman (non-italic) font</li>
<li><tt>italic</tt> – font name for italic font</li>
<li><tt>oblique</tt> – font name for oblique font</li>
</ul>
</td>
</tr>
<tr class="even">
<td><tt>bold</tt></td>
<td>/fonts/family, /fonts/family/encoding-override, /encoding-override</td>
<td>System font names for bold font variant. Attributes:
<ul>
<li><tt>normal</tt> – font name for bold roman (non-italic) font</li>
<li><tt>italic</tt> – font name for bold italic font</li>
<li><tt>oblique</tt> – font name for bold oblique font</li>
</ul>
</td>
</tr>
</table>
<h2><a name="pdflib"></a>html2ps, config PDFLIB/FPDF configuration</h2>
<table class="description_table">
<caption><p>PDFLIB-specific directives in <tt>html2ps.config</tt></p></caption>
<tr class="odd">
<th style="width: 10%;">Option</th>
<th style="width: 10%;">Appears at</th>
<th style="width: 90%;">Description</th>
</tr>
<tr class="even">
<td><tt>fonts-pdf</tt></td>
<td>Top level</td>
<td>Contains information about font-family value to PDF font name mappings.
Note that nested directives and their meanings are the same as for the <tt>fonts</tt>
directive, except that they're applied when PDFLIB is used.</td>
</tr>
<tr class="odd">
<td><tt>ttf</tt></td>
<td>fonts-pdf</td>
<td>Defines mapping of typefaces to available TrueType fonts. Attributes:
<ul>
<li><tt>typeface</tt> – typeface name (refers to the ones used in <tt>normal</tt>, <tt>italic</tt> and <tt>oblique</tt> attributes)</li>
<li><tt>file</tt> – name of the TTF file (searched in TTF_FONTS_REPOSITORY directory)
<li><tt>embed</tt> – flag indicating whether this font file should be embedded in generated PDF (0 - not embedded, 1 - embedded).</ul>
</td>
</tr>
</table>
<h2><a name="constants-common"></a>config.inc.php, Common configuration options</h2>
<table class="description_table">
<caption><p>Common configuration constants</p></caption>
<tr class="odd">
<th>Name</th>
<th>Description</th>
</tr>
<tr class="even">
<td>HTML2PS_DIR</td>
<td>
Path to directory on server where HTML2PS script files reside. All HTML2PS-specific directories and
paths are relative to this directory.
</td>
</tr>
<tr class="odd">
<td>DEFAULT_USER_AGENT</td>
<td>
Value of the 'User-Agent' HTTP header which will be sent by PHP when fetching files from remote server.
</td>
</tr>
<tr class="even">
<td>OUTPUT_DEFAULT_NAME</td>
<td>
Default PDF or PS file name to use when no filename have been specified via API.
</td>
</tr>
<tr class="odd">
<td>DEFAULT_ENCODING</td>
<td>
Default encoding to use when no encoding information is available (e.g. encoding was specified neither in
HTTP headers nor in META tag of HTML page).
</td>
</tr>
</table>
<h2><a name="constants-ps"></a>config.inc.php, Postscript options</h2>
<table class="description_table">
<caption><p>Postscript-related constants</p></caption>
<tr class="odd">
<th>Name</th>
<th>Description</th>
</tr>
<tr class="even">
<td>GS_PATH</td>
<td>
Path to your Ghostscript executable. Note to Windows users! Ghostscript distribution includes two executables: gswin32.exe
(GUI version) and gswin32c.exe (command-line version). You should provide path to <strong>command-line</strong> version
only!
</td>
</tr>
<tr class="odd">
<td>TYPE1_FONTS_REPOSITORY</td>
<td>
Path to font metric (AFM) files. Usually AFM files are packaged together with Ghostscript in 'fonts' subdirectory;
in some Linux distibutions you should install 'ghostscript-fonts' package to get font metrics.
</td>
</tr>
</table>
<h2><a name="constants-pdflib"></a>config.inc.php, PDFLIB options</h2>
<table class="description_table">
<caption><p>PDFLIB-related constants</p></caption>
<tr class="odd">
<th>Name</th>
<th>Description</th>
</tr>
<tr class="even">
<td>PDFLIB_DL_PATH</td>
<td>
Path to PDFLIB dynamically loaded library. If no "pdf" extension loaded, script attempts to call "dl" with
PDFLIB_DF_PATH as argument.
</td>
</tr>
<tr class="odd">
<td>PDFLIB_LICENSE</td>
<td>
Your PDFLIB license key.
</td>
</tr>
<tr class="even">
<td>TTF_FONTS_REPOSITORY</td>
<td>
Path to directory containing a set of True-Type font files to be used by PDFLIB.
</td>
</tr>
</table>
</body>
</html>
|