Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

external-graphic_oversized.xml 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. <testcase>
  18. <info>
  19. <p>
  20. This test checks external-graphics. An oversized image is to be squeezed into page using min/opt/max values.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="normal" page-width="21cm" page-height="29.7cm" margin="2cm">
  27. <fo:region-body background-color="yellow"/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block font-size="8pt">This first block is only to force an infinite loop if the image is not scaled down.</fo:block>
  33. <!-- TODO If you remove the above block, the image is placed on the page although it's too big. No warnings. -->
  34. <fo:block>
  35. <fo:external-graphic src="../resources/images/big-image.png"
  36. inline-progression-dimension.maximum="100%" block-progression-dimension.maximum="100%"
  37. content-width="scale-to-fit" content-height="scale-to-fit" overflow="hidden"/>
  38. </fo:block>
  39. <fo:block>EOF</fo:block>
  40. </fo:flow>
  41. </fo:page-sequence>
  42. </fo:root>
  43. </fo>
  44. <checks>
  45. <eval expected="0 0 595275 841889" xpath="//pageViewport/@bounds"/>
  46. <eval expected="481891" xpath="//regionBody/@ipda"/>
  47. <eval expected="728505" xpath="//regionBody/@bpda"/>
  48. <eval expected="481891" xpath="//flow/block[2]/lineArea/viewport/@ipda"/>
  49. <eval expected="728505" xpath="//flow/block[2]/lineArea/viewport/@bpda + //flow/block[1]/@bpda"/>
  50. </checks>
  51. </testcase>