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.

role.fo 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?xml version="1.0"?>
  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. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB">
  18. <fo:layout-master-set>
  19. <fo:simple-page-master master-name="page"
  20. page-height="220pt" page-width="320pt" margin="10pt">
  21. <fo:region-body/>
  22. </fo:simple-page-master>
  23. </fo:layout-master-set>
  24. <fo:page-sequence master-reference="page">
  25. <fo:flow flow-name="xsl-region-body" hyphenate="true" font-family="sans-serif">
  26. <fo:block role="H1" font-weight="bold" font-size="150%"
  27. space-before.minimum="1.5em"
  28. space-before.optimum="2em"
  29. space-before.maximum="3em"
  30. space-before.precedence="1000"
  31. space-after.minimum="0.2em"
  32. space-after.optimum="0.2em"
  33. space-after.maximum="0.5em"
  34. space-after.precedence="1000">Title 1: To Start With</fo:block>
  35. <fo:block role="H2" font-weight="bold" font-size="120%"
  36. space-before.minimum="1.2em"
  37. space-before.optimum="1.5em"
  38. space-before.maximum="2em"
  39. space-before.precedence="900"
  40. space-after.minimum="0.2em"
  41. space-after.optimum="0.2em"
  42. space-after.maximum="0.5em"
  43. space-after.precedence="900">Title 2: A Sub-Title</fo:block>
  44. <fo:block text-align="justify">Apache FOP (Formatting Objects Processor) is a print formatter
  45. driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java
  46. application that reads a formatting object (FO) tree and renders the resulting pages to a
  47. specified output.</fo:block>
  48. <fo:block role="H2" font-weight="bold" font-size="120%"
  49. space-before.minimum="1.2em"
  50. space-before.optimum="1.5em"
  51. space-before.maximum="2em"
  52. space-before.precedence="900"
  53. space-after.minimum="0.2em"
  54. space-after.optimum="0.2em"
  55. space-after.maximum="0.5em"
  56. space-after.precedence="900">Title 2: Another Sub-Title</fo:block>
  57. <fo:block text-align="justify">Apache FOP (Formatting Objects Processor) is a print formatter
  58. driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java
  59. application that reads a formatting object (FO) tree and renders the resulting pages to a
  60. specified output.</fo:block>
  61. <fo:block role="H1" font-weight="bold" font-size="150%"
  62. space-before.minimum="1.5em"
  63. space-before.optimum="2em"
  64. space-before.maximum="3em"
  65. space-before.precedence="1000"
  66. space-after.minimum="0.2em"
  67. space-after.optimum="0.2em"
  68. space-after.maximum="0.5em"
  69. space-after.precedence="1000">Title 1: Second Title</fo:block>
  70. <fo:block role="H2" font-weight="bold" font-size="120%"
  71. space-before.minimum="1.2em"
  72. space-before.optimum="1.5em"
  73. space-before.maximum="2em"
  74. space-before.precedence="900"
  75. space-after.minimum="0.2em"
  76. space-after.optimum="0.2em"
  77. space-after.maximum="0.5em"
  78. space-after.precedence="900">Title 2: A Sample Table</fo:block>
  79. <fo:block>See data below:</fo:block>
  80. <fo:table table-layout="fixed" width="70%" start-indent="15%" border="0.5pt solid black">
  81. <fo:table-header start-indent="0" font-weight="bold">
  82. <fo:table-row>
  83. <fo:table-cell border="0.5pt solid black" padding="2pt">
  84. <fo:block>Header 1</fo:block>
  85. </fo:table-cell>
  86. <fo:table-cell border="0.5pt solid black" padding="2pt">
  87. <fo:block>Header 2</fo:block>
  88. </fo:table-cell>
  89. </fo:table-row>
  90. </fo:table-header>
  91. <fo:table-footer start-indent="0" font-weight="bold">
  92. <fo:table-row>
  93. <fo:table-cell border="0.5pt solid black" padding="2pt">
  94. <fo:block>Footer 1</fo:block>
  95. </fo:table-cell>
  96. <fo:table-cell border="0.5pt solid black" padding="2pt">
  97. <fo:block>Footer 2</fo:block>
  98. </fo:table-cell>
  99. </fo:table-row>
  100. </fo:table-footer>
  101. <fo:table-body start-indent="0">
  102. <fo:table-row>
  103. <fo:table-cell border="0.5pt solid black" padding="2pt">
  104. <fo:block>Cell 1.1</fo:block>
  105. </fo:table-cell>
  106. <fo:table-cell border="0.5pt solid black" padding="2pt">
  107. <fo:block>Cell 1.2</fo:block>
  108. </fo:table-cell>
  109. </fo:table-row>
  110. <fo:table-row>
  111. <fo:table-cell border="0.5pt solid black" padding="2pt">
  112. <fo:block>Cell 2.1</fo:block>
  113. </fo:table-cell>
  114. <fo:table-cell border="0.5pt solid black" padding="2pt">
  115. <fo:block>Cell 2.2</fo:block>
  116. </fo:table-cell>
  117. </fo:table-row>
  118. </fo:table-body>
  119. </fo:table>
  120. <fo:block text-align="justify" space-before="0.5em">That’s all folks.</fo:block>
  121. </fo:flow>
  122. </fo:page-sequence>
  123. </fo:root>