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.

hide.fo 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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="first"
  5. margin-right="1.5cm"
  6. margin-left="1.5cm"
  7. margin-bottom="2cm"
  8. margin-top="1cm"
  9. page-width="21cm"
  10. page-height="29.7cm">
  11. <fo:region-before extent="1cm"/>
  12. <fo:region-body margin-top="1cm"/>
  13. <fo:region-after extent="1.5cm"/>
  14. </fo:simple-page-master>
  15. </fo:layout-master-set>
  16. <fo:page-sequence master-reference="first">
  17. <fo:static-content flow-name="xsl-region-before">
  18. <fo:block-container height="1cm" width="15cm" top="0cm" left="0cm" position="absolute">
  19. <fo:block>
  20. <fo:retrieve-marker retrieve-class-name="message"
  21. retrieve-boundary="page"
  22. retrieve-position="first-starting-within-page"/>
  23. </fo:block>
  24. </fo:block-container>
  25. <fo:block-container height="1cm" width="15cm" top="0cm" left="0cm" position="absolute">
  26. <fo:block>
  27. <fo:retrieve-marker retrieve-class-name="term"
  28. retrieve-boundary="page"
  29. retrieve-position="last-ending-within-page"/>
  30. </fo:block>
  31. </fo:block-container>
  32. </fo:static-content>
  33. <fo:static-content flow-name="xsl-region-after">
  34. <fo:block text-align="start"
  35. font-size="10pt" font-family="serif" line-height="1em + 2pt">
  36. Page (<fo:page-number/> / <fo:page-number-citation
  37. ref-id="end-seq1"/>)
  38. </fo:block>
  39. </fo:static-content>
  40. <fo:flow flow-name="xsl-region-body">
  41. <fo:block><fo:marker
  42. marker-class-name="message">
  43. <fo:block>
  44. WARNING: Page sequence contains: <fo:page-number-citation
  45. ref-id="end-seq1"/> pages.
  46. </fo:block>
  47. </fo:marker>
  48. </fo:block>
  49. <fo:block text-align="start" font-size="12pt" font-family="sans-serif">
  50. This example shows how it is possible to have a message that appears
  51. only on the first page (in a page sequence) only if there is more
  52. than one page.
  53. </fo:block>
  54. <fo:block text-align="start" font-size="12pt" font-family="sans-serif">
  55. This page sequence only has one page so you will not see the message.
  56. </fo:block>
  57. <fo:block id="end-seq1"><fo:marker
  58. marker-class-name="term">
  59. <fo:instream-foreign-object>
  60. <svg xmlns="http://www.w3.org/2000/svg" width="15cm" height="1cm" xml:space="preserve">
  61. <rect style="fill:white;stroke:white" x="0" y="0" width="15cm" height="1cm"/>
  62. </svg>
  63. </fo:instream-foreign-object>
  64. </fo:marker>
  65. </fo:block>
  66. </fo:flow>
  67. </fo:page-sequence>
  68. <fo:page-sequence master-reference="first" initial-page-number="1">
  69. <fo:static-content flow-name="xsl-region-before">
  70. <fo:block-container height="1cm" width="15cm" top="0cm" left="0cm" position="absolute"> <fo:block>
  71. <fo:retrieve-marker retrieve-class-name="message"
  72. retrieve-boundary="page"
  73. retrieve-position="first-starting-within-page"/>
  74. </fo:block>
  75. </fo:block-container>
  76. <fo:block-container height="1cm" width="15cm" top="0cm" left="0cm" position="absolute"> <fo:block>
  77. <fo:retrieve-marker retrieve-class-name="term"
  78. retrieve-boundary="page"
  79. retrieve-position="last-ending-within-page"/>
  80. </fo:block>
  81. </fo:block-container>
  82. </fo:static-content>
  83. <fo:static-content flow-name="xsl-region-after">
  84. <fo:block text-align="start"
  85. font-size="10pt" font-family="serif" line-height="1em + 2pt">
  86. Page (<fo:page-number/> / <fo:page-number-citation
  87. ref-id="end-of-document"/>)
  88. </fo:block>
  89. </fo:static-content>
  90. <fo:flow flow-name="xsl-region-body">
  91. <fo:block><fo:marker
  92. marker-class-name="message">
  93. <fo:block>
  94. WARNING: Page sequence contains: <fo:page-number-citation
  95. ref-id="end-of-document"/> pages.
  96. </fo:block>
  97. </fo:marker>
  98. </fo:block>
  99. <fo:block text-align="start" font-size="12pt" font-family="sans-serif">
  100. This page sequence has more than one page so you will see the message
  101. only at the top of the first page.
  102. </fo:block>
  103. <fo:block break-before="page" text-align="start" font-size="12pt" font-family="sans-serif">
  104. Some text.
  105. </fo:block>
  106. <fo:block break-before="page" text-align="start" font-size="12pt" font-family="sans-serif">
  107. Some text.
  108. </fo:block>
  109. <fo:block break-before="page" text-align="start" font-size="12pt" font-family="sans-serif">
  110. Some more text on last page.
  111. </fo:block>
  112. <fo:block id="end-of-document"><fo:marker
  113. marker-class-name="term">
  114. <fo:instream-foreign-object>
  115. <svg xmlns="http://www.w3.org/2000/svg" width="15cm" height="1cm" xml:space="preserve"> <rect style="fill:white;stroke:white" x="0" y="0" width="15cm" height="1cm"/>
  116. </svg>
  117. </fo:instream-foreign-object>
  118. </fo:marker>
  119. </fo:block>
  120. </fo:flow>
  121. </fo:page-sequence>
  122. </fo:root>