| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|---|
| 2 | <html>
|
|---|
| 3 | <head>
|
|---|
| 4 | <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|---|
| 5 | <title>Running FOP</title>
|
|---|
| 6 | <link type="text/css" href="skin/page.css" rel="stylesheet">
|
|---|
| 7 | </head>
|
|---|
| 8 | <body text="#000000" bgcolor="#FFFFFF">
|
|---|
| 9 | <!--================= start Navigation Path ==================-->
|
|---|
| 10 | <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0">
|
|---|
| 11 | <tr>
|
|---|
| 12 | <td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" border="0" src="skin/images/spacer.gif"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td>
|
|---|
| 13 | </tr>
|
|---|
| 14 | <tr>
|
|---|
| 15 | <td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" border="0" src="skin/images/spacer.gif"></td>
|
|---|
| 16 | </tr>
|
|---|
| 17 | </table>
|
|---|
| 18 | <!--================= end Navigation Path ==================-->
|
|---|
| 19 | <!--================= start Banner ==================-->
|
|---|
| 20 | <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0">
|
|---|
| 21 | <tr>
|
|---|
| 22 | <!--================= start Group Logo ==================-->
|
|---|
| 23 | <td bgcolor="#294563"><a href="http://xml.apache.org/"><img border="0" class="logoImage" alt="Apache XML" src="images/group-logo.gif"></a></td>
|
|---|
| 24 | <!--================= end Group Logo ==================-->
|
|---|
| 25 | <!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://xml.apache.org/fop/"><img border="0" class="logoImage" alt="FOP" src="images/logo.jpg"></a></td>
|
|---|
| 26 | <!--================= end Project Logo ==================-->
|
|---|
| 27 | <!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563">
|
|---|
| 28 | <form target="_blank" action="http://www.google.com/search" method="get">
|
|---|
| 29 | <table summary="search" border="0" cellspacing="0" cellpadding="0" bgcolor="#4C6C8F">
|
|---|
| 30 | <tr>
|
|---|
| 31 | <td colspan="3"><img height="10" width="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 32 | </tr>
|
|---|
| 33 | <tr>
|
|---|
| 34 | <td><img height="1" width="1" alt="" src="skin/images/spacer.gif"></td><td nowrap="nowrap"><input value="xml.apache.org" name="sitesearch" type="hidden"><input size="15" name="q" id="query" type="text"><img height="1" width="5" alt="" src="skin/images/spacer.gif"><input name="Search" value="Search" type="submit">
|
|---|
| 35 | <br>
|
|---|
| 36 | <font face="Arial, Helvetica, Sans-serif" size="2" color="white">
|
|---|
| 37 | the Apache XML site
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 | </font></td><td><img height="1" width="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 41 | </tr>
|
|---|
| 42 | <tr>
|
|---|
| 43 | <td><img alt="" border="0" height="10" width="9" src="skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="skin/images/spacer.gif"></td><td><img alt="" border="0" height="10" width="9" src="skin/images/search-right.gif"></td>
|
|---|
| 44 | </tr>
|
|---|
| 45 | </table>
|
|---|
| 46 | </form>
|
|---|
| 47 | </td>
|
|---|
| 48 | <!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 49 | </tr>
|
|---|
| 50 | <tr>
|
|---|
| 51 | <td valign="bottom" bgcolor="#294563" colspan="2">
|
|---|
| 52 | <!--================= start Tabs ==================-->
|
|---|
| 53 | <div class="tab">
|
|---|
| 54 | <table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
|
|---|
| 55 | <tr>
|
|---|
| 56 | <td width="8"><img alt="" height="8" width="8" src="skin/images/spacer.gif"></td><td valign="bottom">
|
|---|
| 57 | <table summary="selected tab" style="height: 1.7em" border="0" cellpadding="0" cellspacing="0">
|
|---|
| 58 | <tr>
|
|---|
| 59 | <td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="skin/images/tabSel-left.gif"></td><td valign="middle" bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, Sans-serif"><b><a href="index.html"><font color="#000000">Home</font></a></b></font></td><td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="skin/images/tabSel-right.gif"></td>
|
|---|
| 60 | </tr>
|
|---|
| 61 | </table>
|
|---|
| 62 | </td><td width="8"><img alt="" height="8" width="8" src="skin/images/spacer.gif"></td><td valign="bottom">
|
|---|
| 63 | <table summary="non selected tab" style="height: 1.6em" border="0" cellpadding="0" cellspacing="0">
|
|---|
| 64 | <tr>
|
|---|
| 65 | <td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="skin/images/tab-left.gif"></td><td valign="middle" bgcolor="#B2C4E0"><a href="dev/index.html"><font face="Arial, Helvetica, Sans-serif">Development</font></a></td><td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="skin/images/tab-right.gif"></td>
|
|---|
| 66 | </tr>
|
|---|
| 67 | </table>
|
|---|
| 68 | </td>
|
|---|
| 69 | </tr>
|
|---|
| 70 | </table>
|
|---|
| 71 | </div>
|
|---|
| 72 | <!--================= end Tabs ==================-->
|
|---|
| 73 | </td><td bgcolor="#294563"><img alt="" width="1" height="1" src="skin/images/spacer.gif"></td>
|
|---|
| 74 | </tr>
|
|---|
| 75 | <tr>
|
|---|
| 76 | <td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 77 | </tr>
|
|---|
| 78 | </table>
|
|---|
| 79 | <!--================= end Banner ==================-->
|
|---|
| 80 | <!--================= start Menu, NavBar, Content ==================-->
|
|---|
| 81 | <table summary="page content" bgcolor="#ffffff" width="100%" border="0" cellpadding="0" cellspacing="0">
|
|---|
| 82 | <tr>
|
|---|
| 83 | <td valign="top">
|
|---|
| 84 | <table summary="menu" border="0" cellspacing="0" cellpadding="0">
|
|---|
| 85 | <tr>
|
|---|
| 86 | <!--================= start left top NavBar ==================-->
|
|---|
| 87 | <td rowspan="3" valign="top">
|
|---|
| 88 | <table summary="blue line" border="0" cellpadding="0" cellspacing="0">
|
|---|
| 89 | <tr>
|
|---|
| 90 | <td bgcolor="#294563"><img width="10" height="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 91 | </tr>
|
|---|
| 92 | <tr>
|
|---|
| 93 | <td bgcolor="#CFDCED"><font color="#4C6C8F" size="4" face="Arial, Helvetica, Sans-serif"> </font></td>
|
|---|
| 94 | </tr>
|
|---|
| 95 | <tr>
|
|---|
| 96 | <td bgcolor="#294563"><img width="10" height="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 97 | </tr>
|
|---|
| 98 | </table>
|
|---|
| 99 | </td>
|
|---|
| 100 | <!--================= end left top NavBar ==================--><td bgcolor="#294563"><img width="1" height="1" alt="" src="skin/images/spacer.gif"></td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" src="skin/images/spacer.gif"></td><td nowrap="nowrap" valign="top" bgcolor="#4C6C8F">
|
|---|
| 101 | <!--================= start Menu items ==================-->
|
|---|
| 102 | <div class="menu">
|
|---|
| 103 | <ul>
|
|---|
| 104 | <li>
|
|---|
| 105 | <font color="#CFDCED">Home</font>
|
|---|
| 106 | <ul>
|
|---|
| 107 |
|
|---|
| 108 | <li>
|
|---|
| 109 | <a href="index.html">Introduction</a>
|
|---|
| 110 | </li>
|
|---|
| 111 |
|
|---|
| 112 | </ul>
|
|---|
| 113 | </li>
|
|---|
| 114 | <li>
|
|---|
| 115 | <font color="#CFDCED">Using FOP</font>
|
|---|
| 116 | <ul>
|
|---|
| 117 |
|
|---|
| 118 | <li>
|
|---|
| 119 | <a href="relnotes.html">Release Notes</a>
|
|---|
| 120 | </li>
|
|---|
| 121 |
|
|---|
| 122 | <li>
|
|---|
| 123 | <a href="download.html">Download</a>
|
|---|
| 124 | </li>
|
|---|
| 125 |
|
|---|
| 126 | <li>
|
|---|
| 127 | <a href="compiling.html">Build</a>
|
|---|
| 128 | </li>
|
|---|
| 129 |
|
|---|
| 130 | <li>
|
|---|
| 131 | <a href="configuration.html">Configure</a>
|
|---|
| 132 | </li>
|
|---|
| 133 |
|
|---|
| 134 | <li>
|
|---|
| 135 | <span class="sel"><font color="#ffcc00">Run</font></span>
|
|---|
| 136 | </li>
|
|---|
| 137 |
|
|---|
| 138 | <li>
|
|---|
| 139 | <a href="embedding.html">Embed</a>
|
|---|
| 140 | </li>
|
|---|
| 141 |
|
|---|
| 142 | <li>
|
|---|
| 143 | <a href="servlets.html">Servlets</a>
|
|---|
| 144 | </li>
|
|---|
| 145 |
|
|---|
| 146 | <li>
|
|---|
| 147 | <a href="anttask.html">Ant task</a>
|
|---|
| 148 | </li>
|
|---|
| 149 |
|
|---|
| 150 | </ul>
|
|---|
| 151 | </li>
|
|---|
| 152 | <li>
|
|---|
| 153 | <font color="#CFDCED">Features</font>
|
|---|
| 154 | <ul>
|
|---|
| 155 |
|
|---|
| 156 | <li>
|
|---|
| 157 | <a href="compliance.html">Compliance</a>
|
|---|
| 158 | </li>
|
|---|
| 159 |
|
|---|
| 160 | <li>
|
|---|
| 161 | <a href="output.html">Output Targets</a>
|
|---|
| 162 | </li>
|
|---|
| 163 |
|
|---|
| 164 | <li>
|
|---|
| 165 | <a href="pdfencryption.html">PDF encryption</a>
|
|---|
| 166 | </li>
|
|---|
| 167 |
|
|---|
| 168 | <li>
|
|---|
| 169 | <a href="graphics.html">Graphics</a>
|
|---|
| 170 | </li>
|
|---|
| 171 |
|
|---|
| 172 | <li>
|
|---|
| 173 | <a href="fonts.html">Fonts</a>
|
|---|
| 174 | </li>
|
|---|
| 175 |
|
|---|
| 176 | <li>
|
|---|
| 177 | <a href="hyphenation.html">Hyphenation</a>
|
|---|
| 178 | </li>
|
|---|
| 179 |
|
|---|
| 180 | <li>
|
|---|
| 181 | <a href="extensions.html">Extensions</a>
|
|---|
| 182 | </li>
|
|---|
| 183 |
|
|---|
| 184 | </ul>
|
|---|
| 185 | </li>
|
|---|
| 186 | <li>
|
|---|
| 187 | <font color="#CFDCED">Resources</font>
|
|---|
| 188 | <ul>
|
|---|
| 189 |
|
|---|
| 190 | <li>
|
|---|
| 191 | <a href="gethelp.html">Getting Help</a>
|
|---|
| 192 | </li>
|
|---|
| 193 |
|
|---|
| 194 | <li>
|
|---|
| 195 | <a href="faq.html">FAQs</a>
|
|---|
| 196 | </li>
|
|---|
| 197 |
|
|---|
| 198 | <li>
|
|---|
| 199 | <a href="fo.html">XSL-FO</a>
|
|---|
| 200 | </li>
|
|---|
| 201 |
|
|---|
| 202 | <li>
|
|---|
| 203 | <a href="examples.html">Examples</a>
|
|---|
| 204 | </li>
|
|---|
| 205 |
|
|---|
| 206 | <li>
|
|---|
| 207 | <a href="maillist.html">Mailing Lists</a>
|
|---|
| 208 | </li>
|
|---|
| 209 |
|
|---|
| 210 | <li>
|
|---|
| 211 | <a href="bugs.html">Bugs</a>
|
|---|
| 212 | </li>
|
|---|
| 213 |
|
|---|
| 214 | <li>
|
|---|
| 215 | <a href="license.html">License</a>
|
|---|
| 216 | </li>
|
|---|
| 217 |
|
|---|
| 218 | <li>
|
|---|
| 219 | <a href="resources.html">Other</a>
|
|---|
| 220 | </li>
|
|---|
| 221 |
|
|---|
| 222 | </ul>
|
|---|
| 223 | </li>
|
|---|
| 224 | <li>
|
|---|
| 225 | <font color="#CFDCED">Project</font>
|
|---|
| 226 | <ul>
|
|---|
| 227 |
|
|---|
| 228 | <li>
|
|---|
| 229 | <a href="news.html">News</a>
|
|---|
| 230 | </li>
|
|---|
| 231 |
|
|---|
| 232 | <li>
|
|---|
| 233 | <a href="logocontest.html">Logo contest</a>
|
|---|
| 234 | </li>
|
|---|
| 235 |
|
|---|
| 236 | <li>
|
|---|
| 237 | <a href="status.html">Status</a>
|
|---|
| 238 | </li>
|
|---|
| 239 |
|
|---|
| 240 |
|
|---|
| 241 | <li>
|
|---|
| 242 | <a href="team.html">Team</a>
|
|---|
| 243 | </li>
|
|---|
| 244 |
|
|---|
| 245 | </ul>
|
|---|
| 246 | </li>
|
|---|
| 247 | </ul>
|
|---|
| 248 | </div>
|
|---|
| 249 | <!--================= end Menu items ==================-->
|
|---|
| 250 | </td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" src="skin/images/spacer.gif"></td><td bgcolor="#294563"><img width="1" height="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 251 | </tr>
|
|---|
| 252 | <tr>
|
|---|
| 253 | <td valign="bottom" align="left" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" src="skin/images/menu-left.gif"></td><td bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" src="skin/images/spacer.gif"></td><td valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" src="skin/images/menu-right.gif"></td>
|
|---|
| 254 | </tr>
|
|---|
| 255 | <tr>
|
|---|
| 256 | <td height="1" bgcolor="#294563"><img width="1" height="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 257 | </tr>
|
|---|
| 258 | </table>
|
|---|
| 259 | </td><td valign="top" width="100%">
|
|---|
| 260 | <table summary="content" width="100%" border="0" cellpadding="0" cellspacing="0">
|
|---|
| 261 | <!--================= start middle NavBar ==================-->
|
|---|
| 262 | <tr>
|
|---|
| 263 | <td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 264 | </tr>
|
|---|
| 265 | <tr>
|
|---|
| 266 | <td align="left" width="10" bgcolor="#CFDCED"><img width="10" height="1" alt="" src="skin/images/spacer.gif"></td><td align="left" width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, Helvetica, Sans-serif">
|
|---|
| 267 |
|
|---|
| 268 |
|
|---|
| 269 | </font><img width="10" height="8" alt="" src="skin/images/spacer.gif"></td><td align="right" width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, Helvetica, Sans-serif">
|
|---|
| 270 |
|
|---|
| 271 |
|
|---|
| 272 | </font><img width="10" height="8" alt="" src="skin/images/spacer.gif"></td><td width="10" bgcolor="#CFDCED"><img width="10" height="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 273 | </tr>
|
|---|
| 274 | <tr>
|
|---|
| 275 | <td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 276 | </tr>
|
|---|
| 277 | <!--================= end middle NavBar ==================-->
|
|---|
| 278 | <!--================= start Content==================-->
|
|---|
| 279 | <tr>
|
|---|
| 280 | <td align="left" width="10"><img width="10" height="1" alt="" src="skin/images/spacer.gif"></td><td align="left" width="100%">
|
|---|
| 281 | <div class="content">
|
|---|
| 282 | <table class="title" summary="">
|
|---|
| 283 | <tr>
|
|---|
| 284 | <td valign="middle">
|
|---|
| 285 | <h1>Running FOP</h1>
|
|---|
| 286 | </td><td nowrap="nowrap" width="80" align="center"><a class="dida" href="running.pdf"><img alt="printer" src="skin/images/printer.gif" border="0"><br>
|
|---|
| 287 | print-friendly<br>
|
|---|
| 288 | PDF</a></td>
|
|---|
| 289 | </tr>
|
|---|
| 290 | </table>
|
|---|
| 291 | <ul class="minitoc">
|
|---|
| 292 | <li>
|
|---|
| 293 | <a href="#require">System Requirements</a>
|
|---|
| 294 | </li>
|
|---|
| 295 | <li>
|
|---|
| 296 | <a href="#install">Installation</a>
|
|---|
| 297 | <ul class="minitoc">
|
|---|
| 298 | <li>
|
|---|
| 299 | <a href="#install-instruct">Instructions</a>
|
|---|
| 300 | </li>
|
|---|
| 301 | <li>
|
|---|
| 302 | <a href="#install-problems">Problems</a>
|
|---|
| 303 | </li>
|
|---|
| 304 | </ul>
|
|---|
| 305 | </li>
|
|---|
| 306 | <li>
|
|---|
| 307 | <a href="#standalone-start">Starting FOP as a Standalone Application</a>
|
|---|
| 308 | </li>
|
|---|
| 309 | <li>
|
|---|
| 310 | <a href="#check-input">Using Xalan to Check XSL-FO Input</a>
|
|---|
| 311 | </li>
|
|---|
| 312 | <li>
|
|---|
| 313 | <a href="#memory">Memory Usage</a>
|
|---|
| 314 | </li>
|
|---|
| 315 | <li>
|
|---|
| 316 | <a href="#problems">Problems</a>
|
|---|
| 317 | </li>
|
|---|
| 318 | </ul>
|
|---|
| 319 |
|
|---|
| 320 | <a name="N101BE"></a><a name="require"></a>
|
|---|
| 321 | <h3>System Requirements</h3>
|
|---|
| 322 | <div style="margin-left: 0 ; border: 2px">
|
|---|
| 323 | <p>The following software must be installed:</p>
|
|---|
| 324 | <ul>
|
|---|
| 325 |
|
|---|
| 326 | <li>Java 1.2.x or later Runtime Environment.</li>
|
|---|
| 327 |
|
|---|
| 328 | <li>FOP. The <a href="download.html">FOP distribution</a> includes all libraries that you will need to run a basic FOP installation. These can be found in the xml-fop/lib directory. These libraries include the following:
|
|---|
| 329 | <ul>
|
|---|
| 330 |
|
|---|
| 331 | <li>
|
|---|
| 332 | <a target="_top" href="http://xml.apache.org/xerces-j/index.html">Apache Xerces-J</a> for XML parsing. You can use other XML parsers which support SAX and DOM.</li>
|
|---|
| 333 |
|
|---|
| 334 | <li>
|
|---|
| 335 | <a target="_top" href="http://xml.apache.org/xalan-j/index.html">Apache Xalan-J</a>, an XSLT processor.</li>
|
|---|
| 336 |
|
|---|
| 337 | <li>
|
|---|
| 338 | <a target="_top" href="http://xml.apache.org/batik/">Apache Batik</a>, an SVG library.</li>
|
|---|
| 339 |
|
|---|
| 340 | </ul>
|
|---|
| 341 |
|
|---|
| 342 | </li>
|
|---|
| 343 |
|
|---|
| 344 | </ul>
|
|---|
| 345 | <p>The following sofware is optional, depending on your needs:</p>
|
|---|
| 346 | <ul>
|
|---|
| 347 |
|
|---|
| 348 | <li>Graphics libraries. Support for some graphics formats requires additional packages. See <a href="graphics.html">FOP: Graphics Formats</a> for details.</li>
|
|---|
| 349 |
|
|---|
| 350 | <li>PDF encryption. See <a href="pdfencryption.html">FOP: PDF Encryption</a> for details.</li>
|
|---|
| 351 |
|
|---|
| 352 | </ul>
|
|---|
| 353 | <p>In addition, the following system requirements apply:</p>
|
|---|
| 354 | <ul>
|
|---|
| 355 |
|
|---|
| 356 | <li>If you will be using FOP to process SVG, you must do so in a graphical environment. See <a href="graphics.html#batik">FOP: Graphics (Batik)</a> for details.</li>
|
|---|
| 357 |
|
|---|
| 358 | </ul>
|
|---|
| 359 | </div>
|
|---|
| 360 |
|
|---|
| 361 | <a name="N1020B"></a><a name="install"></a>
|
|---|
| 362 | <h3>Installation</h3>
|
|---|
| 363 | <div style="margin-left: 0 ; border: 2px">
|
|---|
| 364 | <a name="N10211"></a><a name="install-instruct"></a>
|
|---|
| 365 | <h4>Instructions</h4>
|
|---|
| 366 | <div style="margin-left: 0 ; border: 2px">
|
|---|
| 367 | <p>Basic FOP installation consists of first unzipping the <span class="codefrag">.gz</span> file that is the distribution medium, then unarchiving the resulting <span class="codefrag">.tar</span> file in a directory/folder that is convenient on your system. Please consult your operating system documentation or Zip application software documentation for instructions specific to your site.</p>
|
|---|
| 368 | </div>
|
|---|
| 369 | <a name="N10221"></a><a name="install-problems"></a>
|
|---|
| 370 | <h4>Problems</h4>
|
|---|
| 371 | <div style="margin-left: 0 ; border: 2px">
|
|---|
| 372 | <p>Some Mac OSX users have experienced filename truncation problems using Stuffit to unzip and unarchive their distribution media. This is a legacy of older Mac operating systems, which had a 31-character pathname limit. Several Mac OSX users have recommended that Mac OSX users use the shell command <span class="codefrag">tar -xzf</span> instead.</p>
|
|---|
| 373 | </div>
|
|---|
| 374 | </div>
|
|---|
| 375 |
|
|---|
| 376 | <a name="N1022F"></a><a name="standalone-start"></a>
|
|---|
| 377 | <h3>Starting FOP as a Standalone Application</h3>
|
|---|
| 378 | <div style="margin-left: 0 ; border: 2px">
|
|---|
| 379 | <p>The usual and recommended practice for starting FOP from the command line is to run the batch file fop.bat (Windows) or the shell script fop.sh (Unix/Linux).
|
|---|
| 380 | If you write your own scripts, be sure to review these standard scripts to make sure that you get your environment properly configured.</p>
|
|---|
| 381 | <p>The standard scripts for starting FOP require that the environment variable JAVA_HOME be set to a path pointing to the appropriate Java installation on your system. Macintosh OSX includes a Java environment as part of its distribution. We are told by Mac OSX users that the path to use in this case is <span class="codefrag">/Library/Java/Home</span>. <strong>Caveat: </strong>We suspect that, as Apple releases new Java environments and as FOP upgrades the minimum Java requirements, the two will inevitably not match on some systems. Please see <a target="_top" href="http://developer.apple.com/java/faq">Java on Mac OSX FAQ</a> for information as it becomes available.</p>
|
|---|
| 382 | <p>
|
|---|
| 383 | <span class="codefrag">fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-pcl|-ps|-txt|-svg|-at|-print] <outfile></span>
|
|---|
| 384 | </p>
|
|---|
| 385 | <p>[OPTIONS]</p>
|
|---|
| 386 | <pre class="code">
|
|---|
| 387 | -d debug mode
|
|---|
| 388 | -x dump configuration settings
|
|---|
| 389 | -q quiet mode
|
|---|
| 390 | -c cfg.xml use additional configuration file cfg.xml
|
|---|
| 391 | -l lang the language to use for user information
|
|---|
| 392 | -s (-at output) omit tree below block areas
|
|---|
| 393 | -txt.encoding (-txt output encoding use the encoding for the output file.
|
|---|
| 394 | The encoding must be a valid java encoding.
|
|---|
| 395 | -o [password] pdf file will be encrypted with option owner password
|
|---|
| 396 | -u [password] pdf file will be encrypted with option user password
|
|---|
| 397 | -noprint pdf file will be encrypted without printing permission
|
|---|
| 398 | -nocopy pdf file will be encrypted without copy content permission
|
|---|
| 399 | -noedit pdf file will be encrypted without edit content permission
|
|---|
| 400 | -noannotations pdf file will be encrypted without edit annotation permission</pre>
|
|---|
| 401 | <p>[INPUT]</p>
|
|---|
| 402 | <pre class="code"> infile XSLFO input file (the same as the next)
|
|---|
| 403 | -fo infile xsl:fo input file
|
|---|
| 404 | -xml infile xml input file, must be used together with -xsl
|
|---|
| 405 | -xsl stylesheet xslt stylesheet</pre>
|
|---|
| 406 | <p>[OUTPUT]</p>
|
|---|
| 407 | <pre class="code"> outfile input will be rendered as pdf file into outfile
|
|---|
| 408 | -pdf outfile input will be rendered as pdf file (outfile req'd)
|
|---|
| 409 | -awt input will be displayed on screen
|
|---|
| 410 | -mif outfile input will be rendered as mif file (outfile req'd)
|
|---|
| 411 | -pcl outfile input will be rendered as pcl file (outfile req'd)
|
|---|
| 412 | -ps outfile input will be rendered as PostScript file (outfile req'd)
|
|---|
| 413 | -txt outfile input will be rendered as text file (outfile req'd)
|
|---|
| 414 | -svg outfile input will be rendered as an svg slides file (outfile req'd)
|
|---|
| 415 | -at outfile representation of area tree as XML (outfile req'd)
|
|---|
| 416 | -print input file will be rendered and sent to the printer
|
|---|
| 417 | see print specific options with "-print help"</pre>
|
|---|
| 418 | <p>[Examples]</p>
|
|---|
| 419 | <pre class="code"> fop foo.fo foo.pdf
|
|---|
| 420 | fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
|
|---|
| 421 | fop -xsl foo.xsl -xml foo.xml -pdf foo.pdf
|
|---|
| 422 | fop foo.fo -mif foo.mif
|
|---|
| 423 | fop foo.fo -print or fop -print foo.fo
|
|---|
| 424 | fop foo.fo -awt</pre>
|
|---|
| 425 | <p>PDF encryption is only available if FOP was compiled with encryption support <strong>and</strong> if compatible encryption support is availabe at run time. Currently, only the JCE is supported. Check the <a href="pdfencryption.html">Details</a>.</p>
|
|---|
| 426 | </div>
|
|---|
| 427 |
|
|---|
| 428 | <a name="N10270"></a><a name="check-input"></a>
|
|---|
| 429 | <h3>Using Xalan to Check XSL-FO Input</h3>
|
|---|
| 430 | <div style="margin-left: 0 ; border: 2px">
|
|---|
| 431 | <p>FOP sessions that use -xml and -xsl input instead of -fo input are actually controlling two distinct conversions: Tranforming XML to XSL-FO, then formatting the XSL-FO to PDF (or another FOP output format).
|
|---|
| 432 | Although FOP controls both of these processes, the first is included merely as a convenience and for performance reasons.
|
|---|
| 433 | Only the second is part of FOP's core processing.
|
|---|
| 434 | If a user has a problem running FOP, it is important to determine which of these two processes is causing the problem.
|
|---|
| 435 | If the problem is in the first process, the user's stylesheet is likely the cause.
|
|---|
| 436 | The FOP development team does not have resources to help with stylesheet issues, although we have included links to some useful <a href="resources.html#specs">Specifications</a> and <a href="resources.html#articles">Books/Articles</a>.
|
|---|
| 437 | If the problem is in the second process, FOP may have a bug or an unimplemented feature that does require attention from the FOP development team.</p>
|
|---|
| 438 | <div class="frame note">
|
|---|
| 439 | <div class="label">Note</div>
|
|---|
| 440 | <div class="content">The user is always responsible to provide correct XSL-FO code to FOP.</div>
|
|---|
| 441 | </div>
|
|---|
| 442 | <p>In the case of using -xml and -xsl input, although the user is responsible for the XSL-FO code that is FOP's input, it is not visible to the user. To make the intermediate FO file visible, the FOP distribution includes xalan.bat (Windows batch file) and xalan.sh (Unix/Linux script), which run only the first (transformation) step, and write the results to a file.</p>
|
|---|
| 443 | <div class="frame note">
|
|---|
| 444 | <div class="label">Note</div>
|
|---|
| 445 | <div class="content">When asking for help on the FOP mailing lists, <em>never</em> attach XML and XSL to illustrate the issue. Always run the xalan script and send the resulting XSL-FO file instead. Of course, be sure that the XSL-FO file is correct before sending it.</div>
|
|---|
| 446 | </div>
|
|---|
| 447 | <p>
|
|---|
| 448 | The scripts are invoked the same way that <a href="http://xml.apache.org/xalan-j/commandline.html">Xalan</a> is:
|
|---|
| 449 | </p>
|
|---|
| 450 | <p>
|
|---|
| 451 |
|
|---|
| 452 | <span class="codefrag">xalan -in xmlfile -xsl file -out outfile</span>
|
|---|
| 453 |
|
|---|
| 454 | </p>
|
|---|
| 455 | <p>
|
|---|
| 456 | Note that there are some subtle differences between the "fop" and "xalan" command lines.
|
|---|
| 457 | </p>
|
|---|
| 458 | </div>
|
|---|
| 459 |
|
|---|
| 460 | <a name="N1029E"></a><a name="memory"></a>
|
|---|
| 461 | <h3>Memory Usage</h3>
|
|---|
| 462 | <div style="margin-left: 0 ; border: 2px">
|
|---|
| 463 | <p>
|
|---|
| 464 | FOP can consume quite a bit of memory, even though this has been continually improved.
|
|---|
| 465 | This is partly inherent to the formatting process and partly caused by implementation choices.
|
|---|
| 466 | All FO processors currently on the market have memory problems with certain layouts.
|
|---|
| 467 | </p>
|
|---|
| 468 | <p>
|
|---|
| 469 | If you are running out of memory when using FOP, here are some ideas that may help:
|
|---|
| 470 | </p>
|
|---|
| 471 | <ul>
|
|---|
| 472 |
|
|---|
| 473 | <li>
|
|---|
| 474 | Increase memory available to the JVM. See <a href="http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/java.html">the -Xmx option</a> for more information.
|
|---|
| 475 | <!--<warning>-->
|
|---|
| 476 | (Warning: It is usually unwise to increase the memory allocated to the JVM beyond the amount of physical RAM, as this will generally cause significantly slower performance.)
|
|---|
| 477 | <!--</warning>-->
|
|---|
| 478 | </li>
|
|---|
| 479 |
|
|---|
| 480 | <li>
|
|---|
| 481 | Avoid forward references.
|
|---|
| 482 | Forward references are references to some later part of a document.
|
|---|
| 483 | Examples include page number citations which refer to pages which follow the citation, tables of contents at the beginning of a document, and page numbering schemes that include the total number of pages in the document (<a href="faq.html#pagenum">"page N of TOTAL"</a>).
|
|---|
| 484 | Forward references cause all subsequent pages to be held in memory until the reference can be resolved, i.e. until the page with the referenced element is encountered.
|
|---|
| 485 | Forward references may be required by the task, but if you are getting a memory overflow, at least consider the possibility of eliminating them.
|
|---|
| 486 | A table of contents might be eliminated, relying on PDF bookmarks instead.
|
|---|
| 487 | Or it might be moved to the end of the document without dimishing its value very much.
|
|---|
| 488 | Or, in some circumstances, the paper could even be reshuffled after printing.
|
|---|
| 489 | </li>
|
|---|
| 490 |
|
|---|
| 491 | <li>
|
|---|
| 492 | Avoid large images, especially if they are scaled down.
|
|---|
| 493 | If they need to be scaled, scale them in another application upstream from FOP.
|
|---|
| 494 | For many image formats, memory consumption is driven mainly by the size of the image file itself, not its dimensions (width*height), so increasing the compression rate may help.
|
|---|
| 495 | </li>
|
|---|
| 496 |
|
|---|
| 497 | <li>
|
|---|
| 498 | Use multiple page sequences.
|
|---|
| 499 | FOP starts rendering after the end of a page sequence is encountered.
|
|---|
| 500 | While the actual rendering is done page-by-page, some additional memory allocated for other purposes could be freed after the page sequence has been rendered.
|
|---|
| 501 | </li>
|
|---|
| 502 |
|
|---|
| 503 | <li>
|
|---|
| 504 | Break down large tables.
|
|---|
| 505 | If you don't use table headers and footers, just start a new table every N rows.
|
|---|
| 506 | With headers and footers, consider integrating them as normal table rows, or, if they are used at page breaks, try to put the information into static content.
|
|---|
| 507 | You can then use markers to change them.
|
|---|
| 508 | </li>
|
|---|
| 509 |
|
|---|
| 510 | <li>
|
|---|
| 511 | Clear the image cache. At the moment, images in the cache are not released automatically when an OutOfMemoryError is imminent.
|
|---|
| 512 | Starting with version 0.20.5 however, you can call <span class="codefrag">org.apache.fop.image.FopImageFactory.resetCache()</span> to empty the
|
|---|
| 513 | <a target="_top" href="graphics.html#caching">image cache</a>.
|
|---|
| 514 | </li>
|
|---|
| 515 |
|
|---|
| 516 | </ul>
|
|---|
| 517 | <p>
|
|---|
| 518 | There are currently some bugs which cause FOP to go into a nonterminating loop, which will also often result in a memory overflow.
|
|---|
| 519 | A characteristic symptom is continuous <a href="faq.html#boxoverflow">box overflows</a> in the log.
|
|---|
| 520 | Most of these loops are triggered by elements that do not fit in the available space, such as big images or an improperly specified width in nested block elements.
|
|---|
| 521 | The only workaround is to locate such problems and correct them.
|
|---|
| 522 | </p>
|
|---|
| 523 | <p>
|
|---|
| 524 | One of FOP's stated design goals is to be able to process input of arbitrary size.
|
|---|
| 525 | Addressing this goal is one of the prime motivations behind the <a href="dev/index.html">FOP Redesign</a>.
|
|---|
| 526 | </p>
|
|---|
| 527 | </div>
|
|---|
| 528 |
|
|---|
| 529 | <a name="N102E1"></a><a name="problems"></a>
|
|---|
| 530 | <h3>Problems</h3>
|
|---|
| 531 | <div style="margin-left: 0 ; border: 2px">
|
|---|
| 532 | <p>If you have problems running FOP, please see the <a target="_top" href="gethelp.html">"How to get Help" page</a>.</p>
|
|---|
| 533 | </div>
|
|---|
| 534 |
|
|---|
| 535 | </div>
|
|---|
| 536 | </td><td width="10"><img width="10" height="1" alt="" src="skin/images/spacer.gif"></td>
|
|---|
| 537 | </tr>
|
|---|
| 538 | <!--================= end Content==================-->
|
|---|
| 539 | </table>
|
|---|
| 540 | </td>
|
|---|
| 541 | </tr>
|
|---|
| 542 | </table>
|
|---|
| 543 | <!--================= end Menu, NavBar, Content ==================-->
|
|---|
| 544 | <!--================= start Footer ==================-->
|
|---|
| 545 | <table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0">
|
|---|
| 546 | <tr>
|
|---|
| 547 | <td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="skin/images/spacer.gif"><a href="skin/images/label.gif"></a><a href="skin/images/page.gif"></a><a href="skin/images/chapter.gif"></a><a href="skin/images/chapter_open.gif"></a><a href="skin/images/current.gif"></a><a href="/favicon.ico"></a></td>
|
|---|
| 548 | </tr>
|
|---|
| 549 | <tr>
|
|---|
| 550 | <td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright ©
|
|---|
| 551 | 1999-2003 The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!--
|
|---|
| 552 | document.write(" - "+"Last Published: " + document.lastModified);
|
|---|
| 553 | // --></script></font></td>
|
|---|
| 554 | </tr>
|
|---|
| 555 | <tr>
|
|---|
| 556 | <td colspan="2" align="left" bgcolor="#CFDCED" class="logos"></td>
|
|---|
| 557 | </tr>
|
|---|
| 558 | </table>
|
|---|
| 559 | <!--================= end Footer ==================-->
|
|---|
| 560 | </body>
|
|---|
| 561 | </html>
|
|---|