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.

DelegatingFOEventHandlerTestCase.fo 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <?xml version="1.0" 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. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  18. xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
  19. <fo:layout-master-set>
  20. <fo:simple-page-master master-name="page"
  21. page-height="400pt" page-width="300pt" margin="20pt" margin-top="10pt">
  22. <fo:region-body margin-top="20pt"/>
  23. <fo:region-before extent="15pt"/>
  24. </fo:simple-page-master>
  25. </fo:layout-master-set>
  26. <fo:page-sequence master-reference="page">
  27. <fo:static-content flow-name="xsl-region-before">
  28. <fo:block id="1" font-size="7pt" text-align-last="justify" padding-bottom="2pt"
  29. border-bottom="0.25pt solid black">This is the page header<fo:leader/>Page <fo:page-number
  30. id="2"/></fo:block>
  31. </fo:static-content>
  32. <fo:static-content flow-name="xsl-footnote-separator">
  33. <fo:block id="3"><fo:leader leader-length="100pt" leader-pattern="rule"/></fo:block>
  34. </fo:static-content>
  35. <fo:flow flow-name="xsl-region-body">
  36. <fo:block id="4">This is a link to the <fo:wrapper id="5" color="blue"><fo:basic-link id="6"
  37. internal-destination="second-start">next page-sequence</fo:basic-link></fo:wrapper>
  38. (which starts on page <fo:page-number-citation id="7" ref-id="second-start"/> and ends on
  39. page <fo:page-number-citation-last id="8" ref-id="second-end"/>).</fo:block>
  40. <fo:block id="9" font-family="sans-serif" font-weight="bold" space-before="1em"
  41. space-after="0.2em" role="H1"><fo:block id="10">A Title Block</fo:block></fo:block>
  42. <fo:block id="11">This block of text contains a footnote<fo:footnote id="12"><fo:inline id="13"
  43. baseline-shift="super" font-size="70%">1</fo:inline><fo:footnote-body id="14"><fo:block
  44. id="15">A footnote with a link to the <fo:wrapper id="16" color="blue"><fo:basic-link
  45. id="17" external-destination="http://xmlgraphics.apache.org/fop/">FOP
  46. website</fo:basic-link></fo:wrapper></fo:block></fo:footnote-body></fo:footnote>
  47. call.</fo:block>
  48. <fo:table id="18" space-before="1em" width="100%" table-layout="fixed">
  49. <fo:table-column id="19" column-width="proportional-column-width(1)"/>
  50. <fo:table-column id="20" column-width="proportional-column-width(2)"/>
  51. <fo:table-header id="21">
  52. <fo:table-row id="22">
  53. <fo:table-cell id="23" border="2pt solid black" padding="2pt 2pt 0">
  54. <fo:block id="24">Header 1.1</fo:block>
  55. </fo:table-cell>
  56. <fo:table-cell id="25" border="2pt solid black" padding="2pt 2pt 0">
  57. <fo:block id="26">Header 1.2</fo:block>
  58. </fo:table-cell>
  59. </fo:table-row>
  60. </fo:table-header>
  61. <fo:table-footer id="27">
  62. <fo:table-row id="28">
  63. <fo:table-cell id="29" border="2pt solid black" padding="2pt 2pt 0">
  64. <fo:block id="30">Footer 1.1</fo:block>
  65. </fo:table-cell>
  66. <fo:table-cell id="31" border="2pt solid black" padding="2pt 2pt 0">
  67. <fo:block id="32">Footer 1.2</fo:block>
  68. </fo:table-cell>
  69. </fo:table-row>
  70. </fo:table-footer>
  71. <fo:table-body id="33">
  72. <fo:table-row id="34">
  73. <fo:table-cell id="35" border="1pt solid black" padding="2pt 2pt 0">
  74. <fo:block id="36">Cell 1.1</fo:block>
  75. </fo:table-cell>
  76. <fo:table-cell id="37" border="1pt solid black" padding="2pt 2pt 0">
  77. <fo:block id="38">Cell 1.2</fo:block>
  78. </fo:table-cell>
  79. </fo:table-row>
  80. <fo:table-row id="39">
  81. <fo:table-cell id="40" border="1pt solid black" padding="2pt 2pt 0">
  82. <fo:block id="41">Cell 2.1</fo:block>
  83. </fo:table-cell>
  84. <fo:table-cell id="42" border="1pt solid black" padding="2pt 2pt 0">
  85. <fo:block id="43">Cell 2.2</fo:block>
  86. </fo:table-cell>
  87. </fo:table-row>
  88. </fo:table-body>
  89. </fo:table>
  90. <fo:block-container id="44" space-before="1.2em">
  91. <fo:block-container id="45" absolute-position="absolute" top="6pt" right="2.5pt"
  92. inline-progression-dimension="37%" padding="3pt 1pt 2pt 3pt" border="1.5pt solid
  93. darkblue">
  94. <fo:block id="46" color="darkblue" font-size="80%">This is an absolutely positioned
  95. block-container. Nullam interdum mattis ipsum sit amet molestie.</fo:block>
  96. </fo:block-container>
  97. <fo:block id="47" end-indent="37% + 15pt">Lorem ipsum dolor sit amet, consectetur adipiscing
  98. elit. Integer vel lacinia diam. Etiam venenatis magna vel libero imperdiet
  99. rhoncus.</fo:block>
  100. </fo:block-container>
  101. </fo:flow>
  102. </fo:page-sequence>
  103. <fo:page-sequence master-reference="page">
  104. <fo:static-content id="48" flow-name="xsl-region-before">
  105. <fo:block id="49" font-size="7pt" text-align-last="justify" padding-bottom="2pt"
  106. border-bottom="0.25pt solid black">This is the page header<fo:leader id="50"/>Page
  107. <fo:page-number id="51"/></fo:block>
  108. </fo:static-content>
  109. <fo:flow flow-name="xsl-region-body" text-align="justify" space-before.minimum="8pt"
  110. space-before.optimum="10pt" space-before.maximum="12pt">
  111. <fo:block id="second-start">Starting a new page-sequence.</fo:block>
  112. <fo:block id="52" text-align="center">The <fo:external-graphic id="53"
  113. src="test/resources/images/fop-logo-color-24bit.png"
  114. inline-progression-dimension.maximum="50%" content-width="scale-to-fit"
  115. alignment-adjust="-46%" alignment-baseline="middle" fox:alt-text="FOP Logo"/>
  116. logo.</fo:block>
  117. <fo:list-block id="54" provisional-distance-between-starts="15pt"
  118. provisional-label-separation="0" space-before="inherit">
  119. <fo:list-item id="55">
  120. <fo:list-item-label id="56" end-indent="label-end()">
  121. <fo:block id="57">1.</fo:block>
  122. </fo:list-item-label>
  123. <fo:list-item-body id="58" start-indent="body-start()">
  124. <fo:block id="59">First item of a list</fo:block>
  125. </fo:list-item-body>
  126. </fo:list-item>
  127. <fo:list-item id="60">
  128. <fo:list-item-label id="61" end-indent="label-end()">
  129. <fo:block id="62">2.</fo:block>
  130. </fo:list-item-label>
  131. <fo:list-item-body id="63" start-indent="body-start()">
  132. <fo:block id="64">Second item of a list</fo:block>
  133. </fo:list-item-body>
  134. </fo:list-item>
  135. <fo:list-item id="65">
  136. <fo:list-item-label id="66" end-indent="label-end()">
  137. <fo:block id="67">3.</fo:block>
  138. </fo:list-item-label>
  139. <fo:list-item-body id="68" start-indent="body-start()">
  140. <fo:block id="69">Third item of a list</fo:block>
  141. </fo:list-item-body>
  142. </fo:list-item>
  143. </fo:list-block>
  144. <fo:block id="70" text-align="center"><fo:instream-foreign-object id="71"
  145. inline-progression-dimension.maximum="50%" content-width="scale-to-fit">
  146. <svg xmlns="http://www.w3.org/2000/svg" width="319" height="286.6">
  147. <g style="fill-opacity:0.7; stroke:black; stroke-width:3"
  148. transform="translate(0, 286.6) scale(1, -1) translate(100, 100)">
  149. <circle cx="50" cy="86.6" r="80" style="fill:red;"/>
  150. <circle cx="0" cy="0" r="80" style="fill:green;"/>
  151. <circle cx="100" cy="0" r="80" style="fill:blue;"/>
  152. </g>
  153. </svg>
  154. </fo:instream-foreign-object></fo:block>
  155. <fo:block id="72" space-before="inherit">A block containing an <fo:inline id="73"
  156. border="0.5pt solid black" padding="2pt" padding-bottom="0">inline</fo:inline>
  157. element.</fo:block>
  158. <fo:block id="74" space-before="inherit">A block containing a fancy <fo:character id="75"
  159. border="1pt solid black" padding="0 2pt 1pt 2pt" font-family="Symbol" character="♦"/>
  160. character.</fo:block>
  161. <fo:block id="76" space-before="inherit" text-align-last="justify">A leader with special
  162. content: <fo:leader id="77" leader-pattern="use-content"><fo:inline id="78"><fo:character
  163. id="79" character=" "/><fo:inline id="80" border="0.5pt solid black"
  164. padding-left="2pt" padding-right="2pt"><fo:character id="81" baseline-shift="-10%"
  165. character="•"/></fo:inline></fo:inline></fo:leader>.</fo:block>
  166. <fo:block id="second-end" space-before="inherit">Ending the page-sequence.</fo:block>
  167. </fo:flow>
  168. </fo:page-sequence>
  169. </fo:root>