You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

faq.xml 51KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.1//EN" "http://forrest.apache.org/dtd/faq-v12.dtd">
  18. <faqs title="FOP FAQ">
  19. <part id="part-general">
  20. <title>General questions</title>
  21. <faq id="fop-general">
  22. <question>What is FOP?</question>
  23. <answer>
  24. <p>
  25. FOP is a print formatter for <link href="#XSLFO">XSL formatting
  26. objects</link>.
  27. </p>
  28. <p>
  29. It can be used to render an XML file containing XSL formatting objects
  30. into a page layout. The main target is PDF but other rendering targets
  31. are supported, such as AWT, PCL, text and direct printing.
  32. </p>
  33. </answer>
  34. </faq>
  35. <faq id="fop-functions">
  36. <question>What can I do with FOP?</question>
  37. <answer>
  38. <p>
  39. FOP provides both an application and a library that converts an XSL FO
  40. document into paginated output.
  41. </p>
  42. <p>
  43. The FOP command line application can be directly used to transform XML
  44. into PDF, PostScript, PCL and other formats, there is also an AWT
  45. based viewer integrated.
  46. </p>
  47. <p>
  48. The library can be used in servlets and other Java applications.
  49. </p>
  50. </answer>
  51. </faq>
  52. <faq id="fop-acronym">
  53. <question>What does "FOP" stand for?</question>
  54. <answer>
  55. <p>
  56. FOP is an acronym for <strong>F</strong>ormatting
  57. <strong>O</strong>bject <strong>P</strong>rocessor
  58. </p>
  59. </answer>
  60. </faq>
  61. <faq id="fop-other-apache">
  62. <question>How does FOP interact with other Apache Projects?</question>
  63. <answer>
  64. <p>
  65. FOP is distributed with <link
  66. href="http://xml.apache.org/cocoon">Cocoon</link> as a PDF serializer
  67. for XSL (FO) documents.
  68. </p>
  69. <p>
  70. <link href="http://xmlgraphics.apache.org/batik">Batik</link> can be used with
  71. FOP to <link
  72. href="http://xmlgraphics.apache.org/batik/svgrasterizer.html">transcode an SVG
  73. image</link> into a PDF document.
  74. </p>
  75. </answer>
  76. </faq>
  77. <faq id="xsl-def">
  78. <question>What is XSL?</question>
  79. <answer>
  80. <p>
  81. XSL is a W3C standard concerned with publishing XML documents. It
  82. consists of two parts: <link href="#XSLT">XSLT</link> and <link
  83. href="#XSLFO">XSL-FO</link>. The acronym expands to
  84. e<strong>X</strong>tensible <strong>S</strong>tylesheet
  85. <strong>L</strong>anguage.
  86. </p>
  87. </answer>
  88. </faq>
  89. <faq id="xslfo">
  90. <question>What is XSL-FO?</question>
  91. <answer>
  92. <p>
  93. XSLFO (aka XSL-FO) is an XML vocabulary that is used to specify a pagination and
  94. other styling for page layout output. The acronym &#8220;FO&#8221;
  95. stands for
  96. <strong>F</strong>ormatting <strong>O</strong>bjects. XSLFO can be
  97. used in conjunction with <link href="#XSLT">XSLT</link> to convert
  98. from any XML format into a paginated layout ready for printing or
  99. displaying.
  100. </p>
  101. <p>
  102. XSLFO defines a set of elements in XML that describes the way pages
  103. are set up. The contents of the pages are filled from flows. There can
  104. be static flows that appear on every page (for headers and footers)
  105. and the main flow which fills the body of the page.
  106. </p>
  107. <p>
  108. Synonyms: XSL FO, XSL (FO), XSL:FO, XSL-FO, Formatting Objects
  109. </p>
  110. </answer>
  111. </faq>
  112. <faq id="XSLT">
  113. <question>What is XSLT?</question>
  114. <answer>
  115. <p>
  116. XSLT describes the transformation of arbitrary XML input into other
  117. XML (like XSLFO), HTML or plain text. The &#8220;T&#8221; comes from
  118. <strong>T</strong>ransformation. For historical reasons, a
  119. transformation is often also called a &#8220;style sheet&#8221;.
  120. </p>
  121. <p>
  122. Synonyms: XSL transformation, XSL:T, XSL style sheet.
  123. </p>
  124. </answer>
  125. </faq>
  126. <faq id="when">
  127. <question>When will feature X be implemented?</question>
  128. <answer>
  129. <p>The short answer is "Don't ask." For more details, see <link href="gethelp.html#limitations">Understand FOP's Limitations</link>.</p>
  130. </answer>
  131. </faq>
  132. <faq id="next-release">
  133. <question>When is the next released planned?</question>
  134. <answer>
  135. <p>
  136. When it's ready and the committers have enough time to go through
  137. the time-consuming process of creating a release. We
  138. released version 0.93 on 9 January 2007, and intend to
  139. release version 1.0 later in 2007. If you
  140. want to speed up the process, consider to
  141. <link href="dev/index.html#involved">contribute</link> to FOP.</p>
  142. </answer>
  143. </faq>
  144. <faq id="redesign">
  145. <question>Why did you redesign FOP?</question>
  146. <answer>
  147. <p>The code redesign of FOP was necessary in order to be able to adress following issues:</p>
  148. <ul>
  149. <li>Keeps and Breaks</li>
  150. <li>XSL-FO Compliance in general</li>
  151. <li>Process Files of Arbitrary Size</li>
  152. <li>Minimize Memory Use</li>
  153. <li>Table Layout</li>
  154. </ul>
  155. </answer>
  156. </faq>
  157. <faq id="contribute">
  158. <question>How can I contribute?</question>
  159. <answer>
  160. <p>
  161. There are numerous ways that you can help. They are outlined in the <link href="dev/index.html">Developer's Introduction</link> page.
  162. </p>
  163. </answer>
  164. </faq>
  165. </part>
  166. <part id="part-running">
  167. <title>Problems running FOP</title>
  168. <faq id="no-page-master">
  169. <question>I get the error: [ERROR]: 'master-reference' for
  170. 'fo:page-sequence' matches no 'simple-page-master' or
  171. 'page-sequence-master'</question>
  172. <answer>
  173. <p>
  174. FOP was changed to be in accordance with the latest standard (see
  175. <link href="resources.html#specs-xslfo">XSL standard</link>).The page
  176. master for a fo:page-sequence is now referenced by the
  177. master-reference attribute. Replace the master-name attributes of
  178. your fo:page-sequence elements by master-reference attributes. You
  179. have to do this also for fo:single-page-master-reference,
  180. fo:repeatable-page-master-reference and
  181. fo:conditional-page-master-reference elements in you page master
  182. definitions.
  183. </p>
  184. <p>
  185. Update your FO documents and style sheets.
  186. </p>
  187. </answer>
  188. </faq>
  189. <faq id="NoClassDefFound">
  190. <question>I get a NoClassDefFound exception.</question>
  191. <answer>
  192. <p>This is typically a problem with your classpath.</p>
  193. <p>If you are running FOP from the command line:</p>
  194. <ul>
  195. <li>
  196. Use the <code>fop.bat</code>, <code>fop</code> or <code>fop.sh</code> command file from the FOP
  197. distribution. If you have a FOP version older than 0.20.5,
  198. ensure the directory where FOP and these files have been
  199. installed is the current working directory.
  200. </li>
  201. <li>
  202. If this doesn't help, check whether still all the jar files
  203. mentioned in the classpath in the <code>fop.bat</code> file are in their
  204. respective places.
  205. </li>
  206. </ul>
  207. <p>
  208. If you run FOP embedded in your servlet, web application or
  209. other Java application, check the classpath of the
  210. application. Check the also the information pertaining to <link
  211. href="0.93/servlets.html#servlet-engine">servlet engines</link>
  212. for further hints.
  213. </p>
  214. <p>
  215. If you downloaded the source distribution, or a snapshop
  216. from the repository, remember you have to build the FOP jars
  217. first.
  218. </p>
  219. </answer>
  220. </faq>
  221. <faq id="NoSuchMethodException">
  222. <question>I get a NoSuchMethodException or a NoSuchFieldException
  223. exception.</question>
  224. <answer>
  225. <p>
  226. This is usually caused by an older version of one of the FOP jars or
  227. old XML tools in the classpath. Check in particular for parser.jar,
  228. jaxp.jar, xml4j.jar or lotusxsl.jar.
  229. </p>
  230. <p>
  231. Incompatible versions of Batik may also cause this problem. Use the
  232. version of Batik that comes with FOP. It is not always possible to
  233. use a more recent version of Batik.
  234. </p>
  235. </answer>
  236. </faq>
  237. <faq id="OutOfMemoryException">
  238. <question>I get an OutOfMemoryException.</question>
  239. <answer>
  240. <p>
  241. See <link href="0.93/running.html#memory">FOP Memory</link>.
  242. </p>
  243. </answer>
  244. </faq>
  245. <faq id="MalformedURLException">
  246. <question>I get a MalformedURLException.</question>
  247. <answer>
  248. <anchor id="MalformedURL"/>
  249. <p>
  250. What you probably think of as "file names" are usually URLs, in
  251. particular the <code>src</code> attribute of fo:external-graphic.
  252. </p>
  253. <p>
  254. Because usage of URLs is growing, you should make yourself familiar
  255. with it. The relevant specification is <link
  256. href="http://www.rfc-editor.org/rfc/rfc2396.txt">RFC 2396</link>.
  257. </p>
  258. <p>
  259. In a nutshell, the correct syntax for an absolute file URL is
  260. <code>file:///some/path/file.ext</code> on Unix and
  261. <code>file:///z:/some/path/file.ext</code> on Windows systems. Note
  262. the triple slash, and also that only forward slashes are used, even on
  263. windows.
  264. </p>
  265. <p>
  266. A relative file URL starts with anything but a slash, and doesn't have
  267. the <code>file:</code> prefix, for example <code>file.ext</code>,
  268. <code>path/file.ext</code> or <code>../file.ext</code>. The string
  269. <code>file:path/file.ext</code> is <em>not</em> a relative URL,
  270. in fact, it isn't a valid URL at all. A relative URL is subject to a
  271. resolving process, which transforms it into an absolute
  272. URL.
  273. </p>
  274. <!--p>
  275. See Understanding URIs and URLs and Understanding
  276. URL resolving.
  277. </p-->
  278. </answer>
  279. </faq>
  280. <faq id="NullPointerException">
  281. <question>I get an "[ERROR]: null", or a NullPointerException.</question>
  282. <answer>
  283. <p>
  284. This is often caused by an invalid FO document. Currently only very
  285. common errors are intercepted and produce a comprehensible error
  286. message. If you forgot container elements like <code>fo:page-sequence</code> or
  287. <code>fo:flow</code> and put blocks and inline elements directly as children of
  288. <code>fo:root</code> or <code>fo:page-sequence</code>, you'll only get a
  289. NullPointerException. Check whether your FO file has a proper
  290. structure. In some cases there are mandatory properties, like the
  291. master-reference in <code>fo:conditional-page-master-reference</code>, check also
  292. whether you got them right.
  293. </p>
  294. <p>
  295. You may find it helpful to use the <link href="#fo-validate">validation tools</link> to validate your
  296. FO document. This will catch most problems, but should not be
  297. relied upon to catch all.
  298. </p>
  299. <p>
  300. If you use XSLT, problems in your style sheet and in your
  301. source XML also can produce a NullPointerException. <link
  302. href="0.93/running.html#check-input">Run the transformation
  303. separately</link> to check for this, usually you'll get a
  304. detailed error message from the XSLT processor.
  305. </p>
  306. <p>
  307. If you turn on debugging with the "<code>-d</code>" option you may be able to
  308. see more detailed information.
  309. </p>
  310. </answer>
  311. </faq>
  312. <faq id="not-implemented">
  313. <question>FOP returns the message "[ERROR] <em>object|property - 'x'</em> is not implemented yet." When will it be implemented?</question>
  314. <answer>
  315. <p>See FOP's Standards <link href="compliance.html">Compliance</link> page.</p>
  316. </answer>
  317. </faq>
  318. <faq id="fop-hangs">
  319. <question>FOP hangs. FOP does not exit.</question>
  320. <answer>
  321. <p>
  322. The most likely reason is a known problem with the Java run time
  323. environment which is triggered by rendering SVGs. Suns JDK 1.4 does
  324. not have this problem. See also <link href="#svghangs">FOP does not
  325. exit if a SVG is included</link>.
  326. </p>
  327. <p>
  328. Another possibility is that FOP went into a non terminating
  329. loop. Usually this is indicated by lots of log messages of the form
  330. "[INFO]: [NNNN]" which indicate a new page has been started or <link
  331. href="#boxoverflow">box overflows</link>. After some time, FOP will
  332. crash with an OutOfMemoryException.
  333. </p>
  334. <p>
  335. If you called the FOP command line application from some other
  336. program, for example from Java using Runtime.exec(), it may hang
  337. while trying to write log entries to the output pipe. You have to read
  338. the FOP output regularly to empty the pipe buffer. It is best to avoid
  339. exec'ing FOP, use the library interface instead.
  340. </p>
  341. </answer>
  342. </faq>
  343. <faq id="boxoverflow">
  344. <question>FOP runs forever, writing lots of "&gt;" to the log.</question>
  345. <answer>
  346. <p>
  347. There is something too large to fit into the intended place, usually a
  348. large image, a table whose rows are kept together or a block with a
  349. space-before or space-after larger than the page size. Catch the first
  350. page showing this phenomenon and check it. If it is not obvious which
  351. element causes the trouble, remove stuff until the problem goes
  352. away. Decrease the dimensions of the offending element or property, or
  353. increase the dimension of the enclosing element or container, or
  354. remove keep-with-* properties.
  355. </p>
  356. </answer>
  357. </faq>
  358. <faq id="cannot-find-external-graphics">
  359. <question>FOP cannot find a file for fo:external-graphics.</question>
  360. <answer>
  361. <p>The src attribute of the <code>fo:external-graphics</code> element requires a URI, not a file name. See <link href="fo.html#external-resources">External Resources</link> for more information about specifying URIs.</p>
  362. </answer>
  363. </faq>
  364. <faq id="fonts-not-found">
  365. <question>FOP does not find my fonts.</question>
  366. <answer>
  367. <p>
  368. Did you get: &#8220;Failed to read font metrics file C:\foo\arial.xml
  369. : File "C:\foo\arial.xml" not found&#8221;? The value for the
  370. metrics-file attribute in the user config file is actually an URL, not
  371. a file name. Use "file:///C:/foo/arial.xml" instead.
  372. </p>
  373. <p>
  374. If you used a relative URL, make sure your application has the working
  375. directory you expect. Currently FOP does not use the baseDir for
  376. resolving relative URLs pointing to font metric files.
  377. </p>
  378. <p>
  379. Try also setting the <link
  380. href="0.93/configuration.html#general-elements">font-base
  381. configuration</link>.
  382. </p>
  383. </answer>
  384. </faq>
  385. </part>
  386. <part id="part-output">
  387. <title>Problems with FOP output</title>
  388. <faq id="leader-expansion">
  389. <question>Leaders don't work anymore in 0.93. Instead of
  390. filling the line, only three dots or a short ruler is
  391. output.</question>
  392. <answer>
  393. <p>
  394. Leaders still work, in fact they work better than ever
  395. before. You'll just have to add <code>text-align="justify"</code> and/or
  396. <code>text-align-last="justify"</code> to the block with the leader. Be
  397. sure you haven't accidentally overridden the
  398. <code>leader-length.maximum="100%"</code> default value.
  399. </p>
  400. <p>
  401. Earlier versions of FOP used to expand a leader to fill the
  402. rest of the line unconditionally, anything following it,
  403. like page numbers in a TOC, was actually shifted beyong the
  404. right margin.
  405. </p>
  406. <p>
  407. The new implementation uses leader-length.optimum to
  408. determine where to break the line, and expands the leader
  409. only further if the line should be filled, as indicated by
  410. the text-align and text-align-last properties.
  411. </p>
  412. <p>
  413. Actually due to the fuzzyness of the specification both the
  414. old and the new method are conformant (although adding text
  415. after the expanded leader in the old variant never was).
  416. </p>
  417. <p>
  418. If you want to have a longer ruler or space in a
  419. non-justified line, you have to increase the
  420. leader-length.optimum property.
  421. </p>
  422. </answer>
  423. </faq>
  424. <faq id="blank-page-between-page-sequences">
  425. <question>Why does FOP insert a blank page between my page sequences?</question>
  426. <answer>
  427. <p>
  428. This is because spec conformance has been improved.
  429. </p>
  430. <p>
  431. The <link
  432. href="http://www.w3.org/TR/xsl11/#force-page-count">force-page-count
  433. property</link> controls how a FO processor pads page sequences in
  434. order to get certain page counts or last page numbers. The default is
  435. "<code>auto</code>". With this setting, if the next page sequence
  436. begins with an odd page number because you set the
  437. initial-page-number, and the current page sequence also ends with an
  438. odd page number, the processor inserts a blank page to keep odd and
  439. even page numbers alternating (similar for the case the current page
  440. sequence ends with an even page number and the next page sequence
  441. starts with an even page number.
  442. </p>
  443. <p>
  444. If you don't want to have this blank page, use
  445. <code>force-page-count="no-force"</code>.
  446. </p>
  447. </answer>
  448. </faq>
  449. <faq id="graphic-not-displayed">
  450. <question>Why is my graphic not rendered?</question>
  451. <answer>
  452. <p>Most commonly, the external file is not being found by FOP.
  453. Check the following:</p>
  454. <ul>
  455. <li>Empty or wrong baseDir setting.</li>
  456. <li>Spelling errors in the file name (including using the wrong case).</li>
  457. <li>Security Problems (i.e. the image could not be accessed
  458. because FOP is not allowed to read the file). This is
  459. especially a problem if the external file is retrieved over
  460. HTTP. Possible issues include security settings on the
  461. server, server configuration, and missing cookies or other
  462. authorization information. Any easy way to check this is to
  463. cut&amp;paste the source URL from the fo:external-graphic
  464. into the Location field of a browser <strong>on the machine
  465. where the FOP process will be running</strong>.</li>
  466. </ul>
  467. <p>Other possibilities:</p>
  468. <ul>
  469. <li>The image format is not supported or not supported completely.
  470. See <link href="0.93/graphics.html">FOP Graphics Formats</link> for a
  471. list of supported formats and related issues.</li>
  472. <li>The graphic may be too large to fit into the intended space.</li>
  473. <li>There may be something (static content) that is obscuring the
  474. graphic. (This is very rare).
  475. </li>
  476. </ul>
  477. </answer>
  478. </faq>
  479. <faq id="png-fails">
  480. <question>My graphical images do not work properly.</question>
  481. <answer>
  482. <p>See <link href="0.93/graphics.html">FOP Graphics Formats</link> for a
  483. list of supported graphics formats and related issues.</p>
  484. </answer>
  485. </faq>
  486. <faq id="graphic-resolution">
  487. <question>Why is my graphic rendered at a different resolution than it was created?</question>
  488. <answer>
  489. <p>See <link href="0.93/graphics.html#resolution">Graphics Resolution</link>.</p>
  490. </answer>
  491. </faq>
  492. <faq id="keep-with">
  493. <question>Keep-with-next, keep-with-previous, keep-together
  494. don't work.</question>
  495. <answer>
  496. <p>
  497. These properties are not implemented on version 0.20.5 and earlier, except on table rows. In
  498. order to take advantage of them, you have to nest stuff to be
  499. kept together in a table.
  500. </p>
  501. <p>
  502. The concept is called &#8220;blind table&#8221;. The table is used for
  503. pure layout reasons and is not obvious in the output.
  504. </p>
  505. <p>
  506. An example of an image and the image caption to be kept together:
  507. </p>
  508. <source><![CDATA[<fo:table table-layout="fixed" width="100%">
  509. <fo:table-column column-width="proportional-column-width(1)"/>
  510. <fo:table-body>
  511. <fo:table-row keep-with-next="always">
  512. <fo:table-cell>
  513. <fo:block>
  514. <fo:external-graphic src="foo.jpg"/>
  515. </fo:block>
  516. </fo:table-cell>
  517. </fo:table-row>
  518. <fo:table-row>
  519. <fo:table-cell>
  520. <fo:block>Image Caption</fo:block>
  521. </fo:table-cell>
  522. </fo:table-row>
  523. </fo:table-body>
  524. </fo:table>]]></source>
  525. <p>
  526. Consider upgrading to the latest version which supports keeps.
  527. </p>
  528. </answer>
  529. </faq>
  530. <faq id="table-missing">
  531. <question>My tables are missing, or missing their content.</question>
  532. <answer>
  533. <p>
  534. Check for <code>fo:table-body</code> around the rows. FOP up to 0.20.4 doesn't
  535. raise an error if it is omitted, it just drops the content. More
  536. recent releases will catch this problem.
  537. </p>
  538. <p>
  539. Also, the <code>fo:table-with-caption</code> element is not implemented, tables
  540. within such an element are dropped too. FOP generates an error
  541. message for this problem. Older DocBook style sheets generate
  542. <code>fo:table-with-caption</code> elements, so watch out.
  543. </p>
  544. </answer>
  545. </faq>
  546. <faq id="cells-overflow">
  547. <question>Text overflowing table cells and the like is not clipped. Long
  548. text flows into adjacent cells/block, obscuring stuff there.</question>
  549. <answer>
  550. <p>
  551. Clipping as specified by the <code>overflow="hidden"</code> is not yet
  552. implemented. If you have long words overflowing table cells, try to
  553. get them hyphenated. Artificial names like product identifications or
  554. long numbers usually aren't hyphenated. You can try special processing
  555. at XSLT level, like
  556. </p>
  557. <ul>
  558. <li>
  559. clip long text,
  560. </li>
  561. <li>
  562. explicit wrapping+clipping,
  563. </li>
  564. <li>
  565. insert zero width spaces (U+200B or &amp;#x200B;) to allow FOP to
  566. wrap.
  567. </li>
  568. </ul>
  569. <p>
  570. Check the <link href="http://dpawson.co.uk/xsl">XSL FAQ</link> and the
  571. <link href="http://www.mulberrytech.com/xsl/xsl-list/">XSL list
  572. archive</link> for how to perform these tasks.
  573. </p>
  574. </answer>
  575. </faq>
  576. <faq id="row-height-constraint">
  577. <question>FOP tells me: "The contents of row 1 are taller than they should be".
  578. What does that mean?</question>
  579. <answer>
  580. <p>
  581. This is usually caused by setting a "height" on a table-row or table-cell and when
  582. the content is higher than the specified height. By setting "height" (a so-called
  583. corresponding property) you
  584. <link href="http://www.w3.org/TR/xsl11/#d0e4413">implicitely set</link>
  585. block-progression-dimension.minimum, block-progression-dimension.optimum and
  586. block-progression-dimension.maximum to the same value. You'll get some information
  587. about that in the warning message. Look for something like:
  588. "MinOptMax[min=opt=max=14000]".
  589. </p>
  590. <p>
  591. Assuming you set the height on the table-row to 14pt and your content is 75pt high,
  592. a constraint (maximum=14pt) is violated. Normally, you just want to make sure
  593. with the "height" property that the row has a minimum height. If that is so, the
  594. right solution is to specify block-progression-dimension.minimum="14pt" instead of
  595. height="14pt".
  596. </p>
  597. </answer>
  598. </faq>
  599. <faq id="page-number-align">
  600. <question>Page numbers are not properly right aligned.</question>
  601. <answer>
  602. <p>
  603. This happens for <code>fo:page-number-citation</code> elements if the
  604. citation occurs before FOP formatted the requested page,
  605. usually in TOC or index pages. It is caused by the problem
  606. that FOP has to guess how much space the yet unknown page
  607. number will occupy, and usually the guesses are somewhat
  608. off.
  609. </p>
  610. <p>
  611. The most recent FOP releases should have this problem
  612. fixed. Check whether you can upgrade.
  613. </p>
  614. </answer>
  615. </faq>
  616. <faq id="hyphenation-fails">
  617. <question>Hyphenation does not work.</question>
  618. <answer>
  619. <p>Make sure you have set the language and optionally the country attributes for an appropriate XSL-FO element (fo:page-sequence, fo:block or fo:character):</p>
  620. <source><![CDATA[<fo:page-sequence language="fi">]]></source>
  621. <p>See <link href="0.93/hyphenation.html#support">Hyphenation Support</link> for details and instructions on using hyphenation with FOP.</p>
  622. <p>Explicitly enable hyphenation for an appropriate XSL-FO element (fo:block, fo:character):</p>
  623. <source><![CDATA[<fo:block hyphenate="true">]]></source>
  624. </answer>
  625. </faq>
  626. <faq id="indent-inheritance">
  627. <question>When I use margins, my content in a nested table or block-containers gets indented twice. Is this a bug?</question>
  628. <answer>
  629. <p>
  630. (Applies to version 0.90 and later)
  631. No, although you might easily think so. The problem has to do
  632. with property inheritance of the start-indent and end-indent
  633. properties to which the margin properties are mapped. Apache
  634. FOP strictly adheres to the XSL-FO specification here which many
  635. other commercial FO implementations don't do to better meet end-user
  636. expectations. You can make FOP behave like these if you set
  637. <code>setBreakIndentInheritanceOnReferenceAreaBoundary(true)</code>
  638. on the FOUserAgent. The better way is to reset <code>start-indent</code>
  639. and <code>end-indent</code> to "0pt" on table-body or block-container.
  640. For further details, please consult the
  641. <link href="http://wiki.apache.org/xmlgraphics-fop/IndentInheritance">Wiki page on Indent Inheritance</link>.
  642. </p>
  643. </answer>
  644. </faq>
  645. </part>
  646. <part id="part-embedding">
  647. <title>Embedding FOP. Using FOP in a servlet.</title>
  648. <faq id="servlet">
  649. <question>How do I use FOP in a servlet?</question>
  650. <answer>
  651. <p>
  652. See <link href="0.93/servlets.html">Using FOP in a Servlet</link>.
  653. </p>
  654. </answer>
  655. </faq>
  656. <faq id="servlet-with-xslt">
  657. <question>How do I use FOP in a servlet with an XSLT
  658. transformation?</question>
  659. <answer>
  660. <p>
  661. See <link href="0.93/servlets.html#xslt">Using FOP in a Servlet with XSLT Transformation</link>.
  662. </p>
  663. </answer>
  664. </faq>
  665. <faq id="servlet-xslt-params">
  666. <question>How do I pass parameters to the XSLT transformation?</question>
  667. <answer>
  668. <p>
  669. See <link href="0.93/servlets.html#xslt">Using FOP in a Servlet with XSLT Transformation</link>.
  670. </p>
  671. </answer>
  672. </faq>
  673. <faq id="servlet-nonstd-fonts">
  674. <question>How do I use my own fonts when running FOP from a servlet?</question>
  675. <answer>
  676. <p>
  677. Declare the fonts in the <code>userconfig.xml</code> file as usual.
  678. See <link href="#usercfg">loading the user configuration file</link>
  679. for further details.
  680. </p>
  681. </answer>
  682. </faq>
  683. <faq id="servlet-baseDir">
  684. <question>How do I set the baseDir property in a servlet environment?</question>
  685. <answer>
  686. <p>
  687. See <link href="0.93/embedding.html#config-internal">Setting the Configuration Programmatically</link>.
  688. </p>
  689. </answer>
  690. </faq>
  691. <faq id="usercfg">
  692. <question>How do I use a user configuration file from a servlet?</question>
  693. <answer>
  694. <p>
  695. See <link href="0.93/embedding.html#config-external">Using a Configuration File in an Embedded App</link>.
  696. </p>
  697. </answer>
  698. </faq>
  699. <faq id="servlet-NoClassDefFound">
  700. <question>I keep getting NoClassDefFound and other exceptions. How do I
  701. get FOP working for various servlet engines?</question>
  702. <answer>
  703. <p>
  704. See <link href="0.93/servlets.html#servlet-engine">Servlet Engines</link>.
  705. </p>
  706. </answer>
  707. </faq>
  708. <faq id="multithreaded">
  709. <question>Can FOP be used in multithreaded environments?</question>
  710. <answer>
  711. <p>
  712. See <link href="0.93/embedding.html#multithreading">Multithreading FOP</link>.
  713. </p>
  714. </answer>
  715. </faq>
  716. </part>
  717. <part id="part-svg">
  718. <title>SVG specific questions</title>
  719. <faq id="svg-text">
  720. <question>The rendering of SVG text in my PDF is of poor quality.
  721. Can I control this?</question>
  722. <answer>
  723. <p>See <link href="0.93/graphics.html#svg-pdf-text">Placing SVG Text into PDF</link>.</p>
  724. </answer>
  725. </faq>
  726. <faq id="svg-headless">
  727. <question>How do I use FOP with SVG on headless servers?</question>
  728. <answer>
  729. <p>See <link href="0.93/graphics.html#batik">FOP: Graphics (Batik)</link>.</p>
  730. </answer>
  731. </faq>
  732. <faq id="svghangs">
  733. <question>FOP does not exit if a SVG is included.</question>
  734. <answer>
  735. <p>
  736. Applies to older FOP versions and JDK 1.3 and older. That's because
  737. there is an AWT thread hanging around. The solution is to put a
  738. System.exit(0) somewhere.
  739. </p>
  740. </answer>
  741. </faq>
  742. <faq id="svg-url">
  743. <question>I have problems with SVG referring to gradients etc. using
  744. "uri(#stuff)". I get a MalformedURLException.</question>
  745. <answer>
  746. <p>
  747. This is really a "resolving relative URI" problem with some
  748. twists. The problem is that the <code>#stuff</code> URL fragment
  749. identifier is resolved within the current SVG document. So the
  750. reference must be valid within the XML subset and it cannot
  751. reference other SVG documents in the same XML file. Some options
  752. to try:
  753. </p>
  754. <ul>
  755. <li>
  756. Put the SVG into a separate file and use it with
  757. fo:external-graphics.
  758. </li>
  759. <li>
  760. Use a separate SVG file which contains only the gradient (and
  761. perhaps other SVG stuff you want to reference) and point an absolute
  762. URL to it:
  763. <code>fill="url(file:///c:/refstuff/grad.svg#PurpleToWhite)"</code>.
  764. </li>
  765. <li>
  766. Same as above but use a relative URL:
  767. <code>fill="url(grad.svg#PurpleToWhite)"</code>. This may be easier
  768. to deploy.
  769. </li>
  770. <li>
  771. Make sure that the reference is valid in the current SVG document.
  772. </li>
  773. </ul>
  774. <p>
  775. In any case, the referenced stuff has to be pointed to by an URL. It
  776. doesn't necessarily have to be a file URL, HTTP should also
  777. work. Also, expect a performance hit in all cases, because another XML
  778. file has to be retrieved and parsed.
  779. </p>
  780. <p>
  781. Ultimately, both FOP and especially Batik should be fixed to make
  782. your code work as expected, but this will not only take some time
  783. but also some effort by a standard committee in order to make the
  784. semantics of this kind of references in embedded SVG clearer.
  785. </p>
  786. <p>See also <link href="#MalformedURL">MalformedURLException</link></p>
  787. </answer>
  788. </faq>
  789. <faq id="svg-scaling">
  790. <question>Why is my SVG rendered at a size different from that specified in my fo:external-graphic element?</question>
  791. <answer>
  792. <p>See <link href="0.93/graphics.html#svg-scaling">SVG Scaling</link>.</p>
  793. </answer>
  794. </faq>
  795. <faq id="svg-attribute-required">
  796. <question>FOP fails with something like "The attribute "width" of the element &lt;rect&gt; is required". What's wrong?</question>
  797. <answer>
  798. <p>
  799. This phenomenon occurs since FOP 0.92 beta. It surfaced due to a change in the handling of non-FO namespaces. It's not a
  800. bug in FOP, but rather in the dependent packages: Apache Batik, Apache Xalan-J and SAXON. The bug in Apache Batik will be
  801. fixed in the next release. In the latest release of Apache Xalan-J, the bug is already fixed. It only occurs in the Xalan
  802. version bundled with Sun's JVM, because Sun uses a rather old version.
  803. </p>
  804. <p>
  805. Bug description: In a namespace-enabled Level 3 DOM, an attribute in the default namespace must be set with
  806. <code>"null"</code> as the value for the namespace URI. SAX, on the other side, uses an empty string ("") to designate
  807. the default namespace. Many packages appear to not properly handle this difference in which case they still use the empty
  808. string as the namespace URI parameter for <code>org.w3c.dom.Element.setAttributeNS()</code>.
  809. </p>
  810. <p>
  811. Work-around: Use the latest version of Apache Xalan-J. Note that starting with JDK 1.4 it's not enough to replace Xalan-J
  812. on the normal application classpath and you need to override the Xalan-J version bundled with the Sun JVM using the
  813. <link href="http://java.sun.com/j2se/1.4.2/docs/guide/standards/">Endorsed Standards Override Mechanism</link>, i.e.
  814. you must place Xalan-J in the <code>"lib/endorsed"</code> directory of your JRE.
  815. </p>
  816. </answer>
  817. </faq>
  818. </part>
  819. <part id="part-pdf">
  820. <title>PDF specific (includes Acrobat peculiarities)</title>
  821. <faq id="pdf-embed-font">
  822. <question>How do I embed fonts in PDF?</question>
  823. <answer>
  824. <p>
  825. See the <link href="0.93/fonts.html">Fonts</link> page for information
  826. about embedding fonts.
  827. </p>
  828. </answer>
  829. </faq>
  830. <faq id="pdf-characters">
  831. <question>Some characters are not displayed, or displayed incorrectly, or
  832. displayed as &#8220;#&#8221;.</question>
  833. <answer>
  834. <p>
  835. This usually means the selected font doesn't have a glyph
  836. for the character.
  837. </p>
  838. <p>
  839. The standard text fonts supplied with Acrobat Reader have
  840. mostly glyphs for characters from the ISO Latin 1 character
  841. set. For a variety of reasons, even those are not completely
  842. guaranteed to work, for example you can't use the fi
  843. ligature from the standard serif font. Check the <link
  844. href="0.93/output.html#pdf-fonts">overview</link> for the default
  845. PDF fonts.
  846. </p>
  847. <p>
  848. If you use your own fonts, the font must have a glyph for
  849. the desired character. Furthermore the font must be
  850. available on the machine where the PDF is viewed or it must
  851. have been embedded in the PDF file. See <link
  852. href="0.93/fonts.html">embedding fonts</link>.
  853. </p>
  854. <p>
  855. For most symbols, it is better to select the symbol font
  856. explicitely, for example in order to get the symbol for the
  857. mathematical empty set, write:
  858. </p>
  859. <source><![CDATA[<fo:inline font-family="Symbol">&#x2205;</fo:inline>]]></source>
  860. <p>
  861. The "#" shows up if the selected font does not define a glyph for the
  862. required character, for example if you try:
  863. </p>
  864. <source><![CDATA[<fo:inline font-family="Helvetica">&#x2205;</fo:inline>]]></source>
  865. </answer>
  866. </faq>
  867. <faq id="pdf-postprocess">
  868. <question>What tools are available for post-processing my PDF document?</question>
  869. <answer>
  870. <p>See <link href="0.93/output.html#pdf-postprocess">PDF Post-processing</link>.</p>
  871. </answer>
  872. </faq>
  873. <faq id="pdf-security">
  874. <question>How do I add security features (encryption, disable printing)
  875. to my PDF document?</question>
  876. <answer>
  877. <p>
  878. See <link href="0.93/pdfencryption.html">PDF Encryption</link>.
  879. See also <link href="0.93/output.html#pdf-postprocess">PDF Post-processing</link>.
  880. </p>
  881. </answer>
  882. </faq>
  883. <faq id="pdf-doc-properties">
  884. <question>How do I add document properties (title, author, etc.) to my
  885. PDF document?</question>
  886. <answer>
  887. <p>See <link href="0.93/output.html#pdf-postprocess">PDF Post-processing</link>.</p>
  888. </answer>
  889. </faq>
  890. <faq id="pdf-watermark">
  891. <question>How do I add watermarks to my PDF document?</question>
  892. <answer>
  893. <p>See <link href="0.93/output.html#pdf-watermark">PDF Watermarks</link>.</p>
  894. </answer>
  895. </faq>
  896. <faq id="pdf-print-contortion">
  897. <question>The PDF is printed contorted!</question>
  898. <answer>
  899. <p>
  900. Check the paper size in Acrobat settings and the "fit to page" print
  901. setting. Contorted printing is often caused by a mismatched paper
  902. format, for example if the setting is "US Letter" but the PDF was
  903. made for A4. Sometimes also the printer driver interferes, check its
  904. settings too.
  905. </p>
  906. </answer>
  907. </faq>
  908. <faq id="pdf-bookmark-display">
  909. <question>How do I control the Acrobat bookmark display?</question>
  910. <answer>
  911. <p>
  912. FOP versions 0.93 and later support the starting-state property of the XSL 1.1
  913. <link href="http://www.w3.org/TR/xsl11/#fo_bookmark">fo:bookmark</link>
  914. element which can be used for this. The color, font-style and
  915. font-weight properties on
  916. <link href="http://www.w3.org/TR/xsl11/#fo_bookmark-title">fo:bookmark-title</link>
  917. are not yet supported, though.
  918. </p>
  919. </answer>
  920. </faq>
  921. </part>
  922. <part id="part-iex">
  923. <title>IEx specific stuff</title>
  924. <faq id="iex-servlet-multiple">
  925. <question>The FOP servlet is called multiple times!</question>
  926. <answer>
  927. <p>
  928. This is a problem of Internet Explorer requesting the content several
  929. times. Please see the <link href="0.93/servlets.html#ie">notes on Internet Explorer</link>
  930. for more information.
  931. </p>
  932. </answer>
  933. </faq>
  934. <faq id="iex-pdf-print-from-browser">
  935. <question>How do I print PDF directly from the browser?</question>
  936. <answer>
  937. <p>
  938. It depends whether you mean "printing to a printer under control of
  939. the server" or "printing on the client's printer".
  940. </p>
  941. <p>
  942. For the first problem, look at the print servlet in the FOP
  943. examples. You'll have to gather any printer settings in a HTML form
  944. and send it to the server.
  945. </p>
  946. <p>
  947. For the second task, you can use some client side script to start
  948. Acrobat Reader in print mode, or use a Java applet based on the FOP
  949. print servlet. This depends heavily on the client installation and
  950. should not be relied on except in tightly controlled environments.
  951. </p>
  952. <p>
  953. See also <link href="http://marc.theaimsgroup.com/?l=fop-dev&amp;m=101065988325115&amp;w=2">http://marc.theaimsgroup.com/?l=fop-dev&amp;m=101065988325115&amp;w=2</link>
  954. </p>
  955. </answer>
  956. </faq>
  957. </part>
  958. <part id="part-input">
  959. <title>General questions regarding XSLT, XSLFO, and basic XML</title>
  960. <faq id="fo-center">
  961. <question>(FO) How do I vertically center an image or a table (or
  962. whatever)?</question>
  963. <answer>
  964. <p>
  965. See <link href="fo.html#fo-center-vertical">XSL-FO Vertical Centering</link>.
  966. </p>
  967. </answer>
  968. </faq>
  969. <faq id="fo-center-table-horizon">
  970. <question>(FO) How do I center a table horizontally?</question>
  971. <answer>
  972. <p>
  973. See <link href="fo.html#fo-center-table-horizon">XSL-FO Horizontal Centering (Tables)</link>.
  974. </p>
  975. </answer>
  976. </faq>
  977. <faq id="fo-page-outer">
  978. <question>(FO) How to get page numbers printed on the "outer side" of the
  979. page (for books, for example)?</question>
  980. <answer>
  981. <p>
  982. See <link href="fo.html#fo-oddeven">Recto/Verso Static Content Differences</link>.
  983. </p>
  984. </answer>
  985. </faq>
  986. <faq id="oddeven">
  987. <question>(FO) How do I use different static content for odd and even
  988. pages?</question>
  989. <answer>
  990. <p>
  991. See <link href="fo.html#fo-oddeven">Recto/Verso Static Content Differences</link>.
  992. </p>
  993. </answer>
  994. </faq>
  995. <faq id="fo-first-page-header">
  996. <question>(FO) How do I get a special header on the first page?</question>
  997. <answer>
  998. <p>
  999. See <link href="fo.html#fo-first-page">Making the First Page Special</link>.
  1000. </p>
  1001. </answer>
  1002. </faq>
  1003. <faq id="fo-omit-headers">
  1004. <question>(FO) How do I omit my headers on a blank page? How do I write
  1005. "This page is left blank" on an intentionally blank page?</question>
  1006. <answer>
  1007. <p>
  1008. See <link href="fo.html#fo-blank-pages">Blank Pages</link>.
  1009. </p>
  1010. </answer>
  1011. </faq>
  1012. <faq id="fo-special-symbols">
  1013. <question>(FO) How do I print an Euro sign, a checkbox or other some other
  1014. special symbols?</question>
  1015. <answer>
  1016. <p>
  1017. See <link href="fo.html#xml-special-chars">Special Characters</link>.
  1018. </p>
  1019. </answer>
  1020. </faq>
  1021. <faq id="fo-preformat">
  1022. <question>(FO) How do I keep linebreaks and hard spaces? How do I get
  1023. preformatted text displayed as expected?</question>
  1024. <answer>
  1025. <p>
  1026. See <link href="fo.html#fo-preformat">Preformatting Content</link>.
  1027. </p>
  1028. </answer>
  1029. </faq>
  1030. <faq id="fo-total-pages">
  1031. <question>(FO) How do I print the total number of pages, for example "page 1
  1032. of 12"</question>
  1033. <answer>
  1034. <p>
  1035. See <link href="fo.html#fo-total-pages">Total Document Pages</link>.
  1036. </p>
  1037. </answer>
  1038. </faq>
  1039. <faq id="fo-region-overlap">
  1040. <question>(FO) The header overlaps body content. The body extends into
  1041. the footer.</question>
  1042. <answer>
  1043. <p>
  1044. See <link href="fo.html#fo-region-align">Aligning Regions</link>.
  1045. </p>
  1046. </answer>
  1047. </faq>
  1048. <faq id="fo-lines">
  1049. <question>(FO) How do I get lines in the document, as separators, side
  1050. bars or folding marks?</question>
  1051. <answer>
  1052. <p>
  1053. See <link href="fo.html#fo-lines">Drawing Lines</link>.
  1054. </p>
  1055. </answer>
  1056. </faq>
  1057. <faq id="fo-validate">
  1058. <question>(FO) How do I validate my FO document?</question>
  1059. <answer>
  1060. <p>
  1061. See <link href="fo.html#fo-validate">Validating XSL-FO</link>.
  1062. </p>
  1063. </answer>
  1064. </faq>
  1065. <faq id="xml-non-breaking-space">
  1066. <question>(XML) How do I get a non-breaking space in FO? There are complaints about <code>&amp;nbsp;</code>.</question>
  1067. <answer>
  1068. <p>
  1069. See <link href="fo.html#xml-special-chars">XML Special Characters</link>.
  1070. </p>
  1071. </answer>
  1072. </faq>
  1073. <faq id="xml-undefined-entities">
  1074. <question>(XML) How do I enter special characters in XML? There are complaints about undefined entities, such as <code>&amp;uuml;</code>, which work in HTML. </question>
  1075. <answer>
  1076. <p>
  1077. See <link href="fo.html#xml-special-chars">XML Special Characters</link>.
  1078. </p>
  1079. </answer>
  1080. </faq>
  1081. <faq id="xml-illegal-entities">
  1082. <question>(XML) There are complaints about illegal characters and entities
  1083. in the input.</question>
  1084. <answer>
  1085. <p>
  1086. See <link href="fo.html#xml-entity-chars">Using HTML Character Names</link>.
  1087. </p>
  1088. </answer>
  1089. </faq>
  1090. <faq id="xml-illegal-chars">
  1091. <question>(XML) There are complaints about illegal bytes or characters in
  1092. the input. There are odd characters in the result.</question>
  1093. <answer>
  1094. <p>
  1095. See <link href="fo.html#xml-encoding">XML Encoding Issues</link>.
  1096. </p>
  1097. </answer>
  1098. </faq>
  1099. <faq id="xslt-current-date">
  1100. <question>(XSLT) How can I use the current date and time in my document?</question>
  1101. <answer>
  1102. <p>See <link href="fo.html#xslt-date">Current Date and Time</link>.</p>
  1103. </answer>
  1104. </faq>
  1105. <faq id="xhtml-to-pdf">
  1106. <question>Can I use FOP to convert XHTML or HTML files to PDF?</question>
  1107. <answer>
  1108. <p>
  1109. You will get better results if you transform your source
  1110. XML directly into XSLFO. It is tempting to use the
  1111. XML-&gt;XHTML-&gt;XSLFO approach, because this apparently means
  1112. there's only one transformation to maintain, but XHTML
  1113. and publishing grade PDF are dissimilar enough that an
  1114. "generic" XHTML-&gt;XSLFO(PDF) usually wont cut it, because
  1115. the XHTML already lacks information from the original XML.
  1116. It may be worthwhile to go from the source XML to an
  1117. intermediate custom XML which on one hand is close enough
  1118. to representation to allow simple transformation to either
  1119. XHTML or XSLFO for most of the structure, but on the other
  1120. hand retains enough semantic from the original XML that
  1121. elements which must be handled differently in the two
  1122. representations can be handled differently. Setting this
  1123. up requires experience and most likely extensive prototyping.
  1124. </p>
  1125. </answer>
  1126. </faq>
  1127. <faq id="xhtml-to-pdf2">
  1128. <question>I know it may be a bad idea to use FOP to convert XHTML or HTML files to PDF, but I want to do it anyway. Are there any tools available to help me?</question>
  1129. <answer>
  1130. <p>
  1131. The <link href="resources.html">FOP Resources page</link> has links
  1132. to a tool called <link href="http://html2fo.sourceforge.net/">html2fo</link>
  1133. which can be used to make such a transformation. In addition, there
  1134. are tools on the Antenna House <link href="http://www.antennahouse.com/XSLsample/XSLsample.htm">XSL-FO Tutorial and Sample</link>
  1135. page.
  1136. </p>
  1137. </answer>
  1138. </faq>
  1139. </part>
  1140. <part id="dev-help">
  1141. <title>Development-related Questions.</title>
  1142. <faq id="doc-mgt">
  1143. <question>Where can I learn how the FOP docs and web site are built?</question>
  1144. <answer>
  1145. <p>
  1146. See FOP <link href="dev/doc.html">Doc Management</link>. ;-)
  1147. </p>
  1148. </answer>
  1149. </faq>
  1150. </part>
  1151. <part id="part-help">
  1152. <title>General suggestions. How to solve problems.</title>
  1153. <faq id="bugs">
  1154. <question>I think I have found a bug in FOP. What should I do?</question>
  1155. <answer>
  1156. <p>
  1157. See <link href="bugs.html">the Bugs page</link> for information about
  1158. bugs already reported and how to report new ones.
  1159. </p>
  1160. </answer>
  1161. </faq>
  1162. <faq id="postquestions">
  1163. <question>I have questions that are not addressed in this FAQ. Where
  1164. should I post them?</question>
  1165. <answer>
  1166. <ul>
  1167. <li>If your question is a development-related question, please see the <link href="dev/faq.html">Developer FAQs</link>.</li>
  1168. <li>
  1169. If you have a runtime exception or other runtime problem:
  1170. <ul>
  1171. <li>
  1172. double-check the <link href="#part-running">Runtime FAQs</link>.
  1173. </li>
  1174. <li>
  1175. ClassNotFoundException, NoSuchMethodException and
  1176. NoSuchFieldException problems are almost always a problem with
  1177. the local environment. Try to get local help first.
  1178. </li>
  1179. <li>
  1180. Check <link href="bugs.html#issues_existing">Reported Issues</link>
  1181. to see if this is a known problem.
  1182. </li>
  1183. <li>If none of the above apply, post a question to the fop-dev
  1184. mailing list.
  1185. </li>
  1186. </ul>
  1187. </li>
  1188. <li>
  1189. In the case where something works properly with another formatter,
  1190. (AntennaHouse, PassiveTex, etc.) but doesn't work with FOP, please
  1191. check the <link href="relnotes.html">Release Notes</link>, the
  1192. <link href="compliance.html">FOP Standards Compliance</link> document,
  1193. and the remaining FAQ in this document. If not found there, look at the
  1194. list of <link href="bugs.html#issues_existing">Bugs Already Reported</link>.
  1195. If not found there, please post a question on the fop-user mailing list
  1196. or <link href="bugs.html#issues_new">Open a New Bug</link>.
  1197. </li>
  1198. <li>
  1199. Question about how to use FOP, how to perform certain tasks with FOP
  1200. or how to integrate FOP into another application should be posted to
  1201. fop-user.
  1202. </li>
  1203. <li>
  1204. XSLT specific stuff sould go to the <link
  1205. href="http://www.mulberrytech.com/xsl/xsl-list/">XSL
  1206. list</link>. This includes problems with the language and XSLT
  1207. HOW-TOs.
  1208. </li>
  1209. <li>
  1210. Problems specific to a certain XSLT processor, like Xalan, Saxon or
  1211. MSXML, should be handled by processor specific lists. This includes
  1212. problems with deployment, processor specific extensions, suspected
  1213. bugs and processor specific APIs. Note that JDK 1.4 comes with an
  1214. XML parser and an XSLT processor which are older versions of
  1215. Xerces and Xalan, respectively, and both have a number of annoying
  1216. bugs. See $$$FIXME on how to use more recent versions or other
  1217. packages instead.
  1218. </li>
  1219. <li>
  1220. Problems with servlet containers should be asked on the vendor
  1221. specific lists for these software packages.
  1222. </li>
  1223. <li>
  1224. More general questions regarding Java, including deployment, Java
  1225. APIs, classpath issues and property definitions should be redirected
  1226. to some Java specific list.
  1227. </li>
  1228. </ul>
  1229. </answer>
  1230. </faq>
  1231. </part>
  1232. </faqs>