aboutsummaryrefslogtreecommitdiffstats
path: root/docs/examples/fo/instream.fo
blob: f4962ea4ba330e8daaea6c08456b63e5ce5995ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
  <fo:simple-page-master master-name="one">
    <fo:region-body margin-top="25pt" margin-bottom="25pt" margin-left="50pt" margin-right="50pt" />
  </fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="one">
<fo:flow flow-name="xsl-region-body">
      <fo:block>This is used to show how foreign objects are placed in a line area.</fo:block>
      <fo:block>
      	Some block text to separate instream objects.
      </fo:block>
      <fo:block>
      	Some text before
<fo:instream-foreign-object>
<svg:svg width="20" height="20">
  <svg:g style="fill:red; stroke:#000000">
     <svg:rect x="0" y="0" width="15" height="15"/>
     <svg:rect x="5" y="5" width="15" height="15"/>
  </svg:g>
</svg:svg>
</fo:instream-foreign-object>
      	and some after the svg element.
      </fo:block>
      <fo:block>
      	A text line below the instream object.
      </fo:block>
      <fo:block>
<fo:instream-foreign-object>
<svg:svg width="250" height="50">
  <svg:g style="fill:red; stroke:#000000">
     <svg:rect x="0" y="0" width="15" height="15"/>
     <svg:rect x="5" y="5" width="15" height="15"/>
  </svg:g>
    <svg:text x="10" y="30">SVG placed in a block</svg:text>
</svg:svg>
</fo:instream-foreign-object>
      </fo:block>
      <fo:block>
      	A text line below the block.
      </fo:block>
      <fo:block>
      	A text line with an instream foreign object that is before the line break.
<fo:instream-foreign-object>
<svg:svg width="50" height="50">
  <svg:g style="fill:red; stroke:#000000">
     <svg:rect x="0" y="0" width="15" height="15"/>
     <svg:rect x="5" y="5" width="15" height="15"/>
  </svg:g>
     <svg:rect x="0" y="0" width="49" height="49"/>
</svg:svg>
</fo:instream-foreign-object>
With some text on the next line. With a bit more text to go over the to the next line.
      </fo:block>
      <fo:block>
      	A text line with an instream foreign object that is after the line break.
With some text on the next line. With a bit
<fo:instream-foreign-object>
<svg:svg width="50" height="50">
  <svg:g style="fill:red; stroke:#000000">
     <svg:rect x="0" y="0" width="15" height="15"/>
     <svg:rect x="5" y="5" width="15" height="15"/>
  </svg:g>
     <svg:rect x="0" y="0" width="49" height="49"/>
</svg:svg>
</fo:instream-foreign-object>
more text to go over the to the next line.
      </fo:block>
      <fo:block>
      	A text line with an instream foreign object that is over the line break.
With some text
<fo:instream-foreign-object>
<svg:svg width="50" height="50">
  <svg:g style="fill:red; stroke:#000000">
     <svg:rect x="0" y="0" width="15" height="15"/>
     <svg:rect x="5" y="5" width="15" height="15"/>
  </svg:g>
     <svg:rect x="0" y="0" width="49" height="49"/>
</svg:svg>
</fo:instream-foreign-object>
on the next line. With a bit more text to go over the to the next line to
see it handles it properly.
      </fo:block>
      <fo:block>
          The next block has an instream object wider than the area.
      </fo:block>
      <fo:block>
<fo:instream-foreign-object>
<svg:svg width="550" height="50">
  <svg:g style="fill:red; stroke:#000000">
     <svg:rect x="0" y="0" width="15" height="15"/>
     <svg:rect x="5" y="5" width="15" height="15"/>
  </svg:g>
     <svg:rect x="0" y="0" width="549" height="49"/>
    <svg:text x="10" y="30">SVG placed in a really wide block</svg:text>
</svg:svg>
</fo:instream-foreign-object>
      </fo:block>
      <fo:block>
          This block has an instream object wider than the area after this text
<fo:instream-foreign-object>
<svg:svg width="550" height="50">
  <svg:g style="fill:red; stroke:#000000">
     <svg:rect x="0" y="0" width="15" height="15"/>
     <svg:rect x="5" y="5" width="15" height="15"/>
  </svg:g>
     <svg:rect x="0" y="0" width="549" height="49"/>
    <svg:text x="10" y="30">SVG placed in a really wide block</svg:text>
</svg:svg>
</fo:instream-foreign-object>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>