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.

size.fo 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?xml version="1.0" encoding="utf-8"?>
  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 font-family="Times Roman" font-size="12pt" xmlns:fo="http://www.w3.org/1999/XSL/Format">
  18. <fo:layout-master-set>
  19. <fo:simple-page-master
  20. margin-right="1.5cm"
  21. margin-left="1.5cm"
  22. margin-bottom="2cm"
  23. margin-top="1cm"
  24. page-width="21cm"
  25. page-height="29.7cm"
  26. master-name="left">
  27. <fo:region-body margin-top="0.5cm" margin-bottom="1.7cm"/>
  28. <fo:region-before extent="0.5cm"/>
  29. <fo:region-after extent="1.5cm"/>
  30. </fo:simple-page-master>
  31. </fo:layout-master-set>
  32. <fo:page-sequence id="N2528" master-reference="left">
  33. <fo:static-content flow-name="xsl-region-after">
  34. <fo:block text-align-last="center" font-size="10pt">
  35. <fo:page-number/>
  36. </fo:block>
  37. </fo:static-content>
  38. <fo:flow flow-name="xsl-region-body">
  39. <fo:block font-size="18pt" font-weight="bold" text-align="center">1. FOP test for images</fo:block>
  40. <fo:block>
  41. <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Normal</fo:block>
  42. <fo:block>
  43. The image (<fo:external-graphic src="images/fop.jpg"/>) is placed normally.
  44. </fo:block>
  45. </fo:block>
  46. <fo:block>
  47. <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block>
  48. <fo:block>
  49. The image
  50. (<fo:external-graphic content-width="50pt" content-height="50pt" src="images/fop.jpg"/>)
  51. has the content size set.
  52. </fo:block>
  53. </fo:block>
  54. <fo:block>
  55. <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block>
  56. <fo:block>
  57. The image
  58. (<fo:external-graphic width="150pt" height="50pt" src="images/fop.jpg"/>)
  59. has the width and height set.
  60. </fo:block>
  61. </fo:block>
  62. <fo:block>
  63. <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block>
  64. <fo:block>
  65. The image
  66. (<fo:external-graphic inline-progression-dimension.optimum="150pt" block-progression-dimension.optimum="50pt" src="images/fop.jpg"/>)
  67. has the ipd and bpd set.
  68. </fo:block>
  69. </fo:block>
  70. <fo:block>
  71. <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Clipped</fo:block>
  72. <fo:block>
  73. The image
  74. (<fo:external-graphic width="100pt" height="100pt" content-width="200pt" content-height="200pt" overflow="hidden" src="images/fop.jpg"/>)
  75. is clipped with the content size double the viewport size.
  76. </fo:block>
  77. </fo:block>
  78. <fo:block>
  79. <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Clipped</fo:block>
  80. <fo:block>
  81. The image
  82. (<fo:external-graphic width="50pt" height="50pt" overflow="error-if-overflow" src="images/fop.jpg"/>)
  83. is clipped with the content size double the viewport size.
  84. This has <fo:inline font-style="italic">error-if-overflow</fo:inline>
  85. set so there should be an error reported, it can recover from the
  86. error by clipping to the viewport.
  87. </fo:block>
  88. </fo:block>
  89. <fo:block>
  90. <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Scaling</fo:block>
  91. <fo:block>
  92. The image
  93. (<fo:external-graphic content-width="100pt" content-height="50pt" scaling="non-uniform" src="images/fop.jpg"/>)
  94. has non-uniform scaling.
  95. </fo:block>
  96. <fo:block>
  97. The image
  98. (<fo:external-graphic content-width="50pt" content-height="100pt" scaling="non-uniform" src="images/fop.jpg"/>)
  99. has non-uniform scaling.
  100. </fo:block>
  101. <fo:block>
  102. The image
  103. (<fo:external-graphic content-width="100pt" content-height="75pt" scaling="uniform" src="images/fop.jpg"/>)
  104. has uniform scaling.
  105. </fo:block>
  106. <fo:block>
  107. The image
  108. (<fo:external-graphic content-width="75pt" content-height="100pt" scaling="uniform" src="images/fop.jpg"/>)
  109. has uniform scaling.
  110. </fo:block>
  111. <fo:block>
  112. The image
  113. (<fo:external-graphic width="75pt" height="100pt" content-width="scale-to-fit" content-height="scale-to-fit" src="images/fop.jpg"/>)
  114. is scaled to fit the viewport.
  115. </fo:block>
  116. </fo:block>
  117. <fo:block>
  118. <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/>
  119. This section is only required to show that the layout still works.
  120. </fo:block>
  121. </fo:flow>
  122. </fo:page-sequence>
  123. </fo:root>