Chinaunix首页 | 论坛 | 博客
  • 博客访问: 64799
  • 博文数量: 17
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 245
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-19 22:12
个人简介

hello、、、、

文章分类

全部博文(17)

分类: Java

2014-03-07 22:45:34

来源

2:https://xmlgraphics.apache.org/fop/dev/svg.html

 代码: 

点击(此处)折叠或打开

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


效果展示
阅读(2988) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~