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.

foreign.fo 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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
  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. master-name="first">
  12. <fo:region-before extent="1cm"/>
  13. <fo:region-body margin-top="1cm"/>
  14. <fo:region-after extent="1.5cm"/>
  15. </fo:simple-page-master>
  16. </fo:layout-master-set>
  17. <fo:page-sequence master-reference="first">
  18. <fo:static-content flow-name="xsl-region-before">
  19. <fo:block line-height="14pt" font-size="10pt"
  20. text-align="end">Embedding SVG examples</fo:block>
  21. </fo:static-content>
  22. <fo:static-content flow-name="xsl-region-after">
  23. <fo:block line-height="14pt" font-size="10pt"
  24. text-align="end">Page <fo:page-number/></fo:block>
  25. </fo:static-content>
  26. <fo:flow flow-name="xsl-region-body">
  27. <fo:block text-align="center" font-weight="bold" font-size="14pt" space-before.optimum="3pt" space-after.optimum="15pt">
  28. Embedding SVG
  29. </fo:block>
  30. <fo:block space-before.optimum="3pt" space-after.optimum="20pt">
  31. <fo:instream-foreign-object>
  32. <foo xmlns="http://www.foo.com" width="20" height="20">
  33. <g style="fill:red; stroke:#000000">
  34. <rect x="0" y="0" width="15" height="15"/>
  35. <rect x="5" y="5" width="15" height="15"/>
  36. </g>
  37. </foo>
  38. </fo:instream-foreign-object>
  39. </fo:block>
  40. <fo:block space-before.optimum="5pt">
  41. <fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg">
  42. <svg:svg width="20" height="20">
  43. <svg:g style="fill:red; stroke:#000000">
  44. <svg:rect x="0" y="0" width="15" height="15"/>
  45. <svg:rect x="5" y="5" width="15" height="15"/>
  46. </svg:g>
  47. </svg:svg>
  48. </fo:instream-foreign-object>
  49. </fo:block>
  50. <foo xmlns="http://www.foo.com" width="20" height="20">
  51. <g style="fill:red; stroke:#000000">
  52. <rect x="0" y="0" width="15" height="15"/>
  53. <rect x="5" y="5" width="15" height="15"/>
  54. </g>
  55. </foo>
  56. <foo width="20" height="20">
  57. <rect x="5" y="5" width="15" height="15"/>
  58. </foo>
  59. <fo:foo width="20" height="20">
  60. <fo:rect x="5" y="5" width="15" height="15"/>
  61. </fo:foo>
  62. </fo:flow>
  63. </fo:page-sequence>
  64. </fo:root>