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.

embedding.xml 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  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 document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
  18. <document>
  19. <header>
  20. <title>Apache™ FOP Design: Embedding Apache� FOP in Other Applications</title>
  21. <version>$Revision$</version>
  22. <authors>
  23. <person name="Keiron Liddle" email="keiron@aftexsw.com"/>
  24. </authors>
  25. </header>
  26. <body>
  27. <section id="intro">
  28. <title>Introduction</title>
  29. <p>
  30. This is the design for the external interface when Apache™ FOP is to be embedded
  31. inside another java application.
  32. </p>
  33. <p>
  34. Common places where FOP is embedded is in a report production application
  35. of a server side application such as <jump href="http://xml.apache.org/cocoon/index.html">Cocoon</jump>.
  36. </p>
  37. </section>
  38. <section>
  39. <title>Settings</title>
  40. <section>
  41. <title>User Agent</title>
  42. <p>
  43. Possible meanings for a user agent:
  44. </p>
  45. <ul>
  46. <li>something that makes decisions where the specifiction indicates
  47. that the user agent should decide</li>
  48. <li>FOP as the user agent, represented by a class that handles
  49. various setup and decision values</li>
  50. <li>an class that handles context for a particular FOP conversion
  51. that can be configured/overridden when embedding</li>
  52. </ul>
  53. <p>
  54. The user agent is responsible for supplying user or context
  55. specific information. The list of user agent values can be found on the
  56. <jump href="useragent.html">User Agent</jump> page.
  57. </p>
  58. </section>
  59. <section>
  60. <title>Logging</title>
  61. <ul>
  62. <li>logging level</li>
  63. <li>logging messages of various levels</li>
  64. <li>error handling</li>
  65. <li>Logging setup (LogKit, Log4J, JDK14Logging)</li>
  66. </ul>
  67. </section>
  68. <section>
  69. <title>XML input</title>
  70. <ul>
  71. <li>various ways to supply FOP with the xsl:fo file, fo, xml+xsl</li>
  72. <li>sax handler</li>
  73. </ul>
  74. </section>
  75. <section>
  76. <title>general options</title>
  77. <ul>
  78. <li>base url</li>
  79. <li>uri resolvers</li>
  80. <li>which implementation of a particular LayoutManager to use</li>
  81. </ul>
  82. </section>
  83. <section>
  84. <title>Rendering Options</title>
  85. <ul>
  86. <li>embedding fonts</li>
  87. <li>compression in pdf</li>
  88. <li>image embedding</li>
  89. </ul>
  90. <p>
  91. for the PS renderer (eventually):
  92. </p>
  93. <ul>
  94. <li>PostScript Level</li>
  95. <li>PPD to use</li>
  96. <li>binary/ascii switch</li>
  97. </ul>
  98. </section>
  99. <section>
  100. <title>Render Results</title>
  101. <p>
  102. Generate Output statistics from FOP:
  103. </p>
  104. <ul>
  105. <li>Number of pages total</li>
  106. <li>Number of pages of each page-sequence</li>
  107. <li>page-master used for each page (could be used to control
  108. the paper bin to get paper from, important for me in conjunction
  109. with PS Renderer)</li>
  110. <li>recoverable errors such as overflow</li>
  111. </ul>
  112. </section>
  113. <section>
  114. <title>Setting Up</title>
  115. <p>
  116. The Driver handles the XML input.
  117. The user agent information is through the FOUserAgent.
  118. Handle logging through the user agent.
  119. Options could also be handled through the user agent, using mime type
  120. selection for renderer options.
  121. </p>
  122. </section>
  123. <section>
  124. <title>Others</title>
  125. <p>
  126. Render to more than one renderer at once (maybe not from the command line).
  127. For example you could generate a PDF for the archive
  128. and the PS for the printer in one run. It would probably be faster than
  129. converting the PDF to PostScript afterwards.
  130. Make the fo tree reuseable.
  131. If the fonts are the same then use the
  132. same area tree to output to different renderers.
  133. </p>
  134. <p>
  135. Several code pieces for resolving URLs and/or
  136. file locations are scattered all over FOP and Batik. These should
  137. be replaced with an URIResolver invocation to unify behaviour and
  138. remove redundancies.
  139. </p>
  140. </section>
  141. </section>
  142. </body>
  143. </document>