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.

flow_changing-ipd_last-page_16.xml 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 that the definition of a special page-master for the last page with a
  21. different width that the previous "rest" page causes FOP to redo the line breaking layout.
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master margin-top="0.25in" margin-right="0.25in" margin-left="0.25in" margin-bottom="0.25in" page-width="8.5in" master-name="RestPages" page-height="11in">
  28. <fo:region-body margin-top="60pt" margin-bottom="10.8pt" column-count="2" region-name="letterPageBody"/>
  29. </fo:simple-page-master>
  30. <fo:simple-page-master margin-right="0.25in" margin-left="0.25in" margin-top="0.25in" margin-bottom="0.25in" page-width="8.5in" master-name="PageLast" page-height="11in">
  31. <fo:region-body margin-top="39.6pt" margin-bottom="10.8pt" region-name="letterPageBody"/>
  32. </fo:simple-page-master>
  33. <fo:page-sequence-master master-name="LetterPages">
  34. <fo:repeatable-page-master-alternatives>
  35. <fo:conditional-page-master-reference page-position="rest" master-reference="PageLast" blank-or-not-blank="blank"/>
  36. <fo:conditional-page-master-reference page-position="last" master-reference="PageLast"/>
  37. <fo:conditional-page-master-reference page-position="any" master-reference="RestPages"/>
  38. </fo:repeatable-page-master-alternatives>
  39. </fo:page-sequence-master>
  40. </fo:layout-master-set>
  41. <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="1" force-page-count="end-on-even" master-reference="LetterPages">
  42. <fo:flow flow-name="letterPageBody" font-size="40pt">
  43. <fo:block>1 test test test test test test</fo:block>
  44. <fo:block>2 test test test test test test</fo:block>
  45. <fo:block>3 test test test test test test</fo:block>
  46. <fo:block>4 test test test test test test</fo:block>
  47. <fo:block>5 test test test test test test</fo:block>
  48. <fo:block>6 test test test test test test</fo:block>
  49. <fo:block>7 test test test test test test</fo:block>
  50. <fo:block>8 test test test test test test</fo:block>
  51. <fo:block>9 test test test test test test</fo:block>
  52. <fo:block>10 test test test test test test</fo:block>
  53. <fo:block>11 test test test test test test</fo:block>
  54. <fo:block>12 test test test test test test</fo:block>
  55. <fo:block>13 test test test test test test</fo:block>
  56. <fo:block>14 test test test test test test</fo:block>
  57. </fo:flow>
  58. </fo:page-sequence>
  59. </fo:root>
  60. </fo>
  61. <checks>
  62. <eval expected="1" xpath="//pageViewport[1]//lineArea[1]//text[1]/word[1]"/>
  63. </checks>
  64. </testcase>