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.

header_footer.fo 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3. <fo:layout-master-set>
  4. <fo:simple-page-master master-name="simplePM"
  5. page-height="25cm"
  6. page-width="18cm"
  7. margin-top="1cm"
  8. margin-bottom="1cm"
  9. margin-left="1.5cm"
  10. margin-right="1.5cm">
  11. <fo:region-before extent="3cm"/>
  12. <fo:region-body margin-top="4cm" margin-bottom="3cm"/>
  13. <fo:region-after extent="3cm"/>
  14. </fo:simple-page-master>
  15. </fo:layout-master-set>
  16. <fo:page-sequence master-name="simplePM">
  17. <!-- header -->
  18. <fo:static-content flow-name="xsl-region-before">
  19. <fo:block-container width="5cm" height="3cm" position="absolute" background-color="#22CC55">
  20. <fo:block text-align="start">
  21. Left
  22. </fo:block>
  23. </fo:block-container>
  24. <fo:block-container width="5cm" height="3cm" left="5cm" position="absolute" background-color="#55AA55">
  25. <fo:block text-align="center">
  26. Center
  27. </fo:block>
  28. </fo:block-container>
  29. <fo:block-container width="5cm" height="3cm" left="10cm" position="absolute" background-color="#FFCCFF">
  30. <fo:block text-align="end">
  31. Right
  32. </fo:block>
  33. </fo:block-container>
  34. </fo:static-content>
  35. <!-- footer -->
  36. <fo:static-content flow-name="xsl-region-after">
  37. <fo:block-container width="5cm" height="3cm" position="absolute">
  38. <fo:block text-align="start">
  39. Left
  40. </fo:block>
  41. </fo:block-container>
  42. <fo:block-container width="5cm" height="3cm" left="5cm" position="absolute">
  43. <fo:block text-align="center">
  44. Center
  45. </fo:block>
  46. </fo:block-container>
  47. <fo:block-container width="5cm" height="3cm" left="10cm" position="absolute">
  48. <fo:block text-align="end">
  49. Right
  50. </fo:block>
  51. </fo:block-container>
  52. </fo:static-content>
  53. <fo:flow flow-name="xsl-region-body">
  54. <fo:block>
  55. There is top-margin for body region.This is bcos margin-top for body is greater than extent of region-before.
  56. </fo:block>
  57. <fo:block>
  58. There is NO bottom-margin for body region. Bcos margin-bottom for body = extent for region-after.
  59. </fo:block>
  60. <fo:block>
  61. </fo:block>
  62. <fo:block>
  63. The fo:static-content formatting object holds a sequence or a tree of formatting objects that is to be presented in a single region or repeated in like-named regions on one or more pages in the page-sequence. Its common use is for repeating or running headers and footers.
  64. </fo:block>
  65. <fo:block>
  66. This content is repeated, in its entirety, on every page to which it is assigned.
  67. </fo:block>
  68. <fo:block>
  69. This content is repeated, in its entirety, on every page to which it is assigned.
  70. </fo:block>
  71. <fo:block>
  72. This content is repeated, in its entirety, on every page to which it is assigned.
  73. </fo:block>
  74. <fo:block>
  75. This content is repeated, in its entirety, on every page to which it is assigned.
  76. </fo:block>
  77. <fo:block>
  78. This content is repeated, in its entirety, on every page to which it is assigned.
  79. </fo:block>
  80. <fo:block>
  81. This content is repeated, in its entirety, on every page to which it is assigned.
  82. </fo:block>
  83. <fo:block>
  84. This content is repeated, in its entirety, on every page to which it is assigned.
  85. </fo:block>
  86. <fo:block>
  87. This content is repeated, in its entirety, on every page to which it is assigned.
  88. </fo:block>
  89. <fo:block>
  90. This content is repeated, in its entirety, on every page to which it is assigned.
  91. </fo:block>
  92. <fo:block>
  93. This content is repeated, in its entirety, on every page to which it is assigned.
  94. </fo:block>
  95. <fo:block>
  96. This content is repeated, in its entirety, on every page to which it is assigned.
  97. </fo:block>
  98. <fo:block>
  99. This content is repeated, in its entirety, on every page to which it is assigned.
  100. </fo:block>
  101. <fo:block>
  102. This content is repeated, in its entirety, on every page to which it is assigned.
  103. </fo:block>
  104. <fo:block>
  105. This content is repeated, in its entirety, on every page to which it is assigned.
  106. </fo:block>
  107. <fo:block>
  108. This content is repeated, in its entirety, on every page to which it is assigned.
  109. </fo:block>
  110. <fo:block>
  111. This content is repeated, in its entirety, on every page to which it is assigned.
  112. </fo:block>
  113. <fo:block>
  114. This content is repeated, in its entirety, on every page to which it is assigned.
  115. </fo:block>
  116. <fo:block>
  117. The fo:static-content formatting object does not generate any areas. The fo:static-content formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:static-content. The order of concatenation is the same order as the children are ordered under the fo:static-content.
  118. </fo:block>
  119. <fo:block>
  120. The fo:static-content formatting object does not generate any areas. The fo:static-content formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:static-content. The order of concatenation is the same order as the children are ordered under the fo:static-content.
  121. </fo:block>
  122. <fo:block>
  123. The fo:static-content formatting object does not generate any areas. The fo:static-content formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:static-content. The order of concatenation is the same order as the children are ordered under the fo:static-content.
  124. </fo:block>
  125. <fo:block>
  126. The fo:static-content formatting object does not generate any areas. The fo:static-content formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:static-content. The order of concatenation is the same order as the children are ordered under the fo:static-content.
  127. </fo:block>
  128. </fo:flow>
  129. </fo:page-sequence>
  130. </fo:root>