| 1 |
<?xml version="1.0" encoding="utf-8"?>
|
| 2 |
|
| 3 |
<fo:root font-family="Times Roman" font-size="12pt" text-align="center"
|
| 4 |
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
| 5 |
xmlns:fox="http://xml.apache.org/fop/extensions">
|
| 6 |
|
| 7 |
<fo:layout-master-set>
|
| 8 |
<fo:simple-page-master master-name="right"
|
| 9 |
margin-top="75pt"
|
| 10 |
margin-bottom="25pt"
|
| 11 |
margin-left="100pt"
|
| 12 |
margin-right="50pt">
|
| 13 |
<fo:region-body margin-bottom="50pt"/>
|
| 14 |
<fo:region-after extent="25pt"/>
|
| 15 |
</fo:simple-page-master>
|
| 16 |
|
| 17 |
<fo:simple-page-master master-name="left"
|
| 18 |
margin-top="75pt"
|
| 19 |
margin-bottom="25pt"
|
| 20 |
margin-left="50pt"
|
| 21 |
margin-right="100pt">
|
| 22 |
<fo:region-body margin-bottom="50pt"/>
|
| 23 |
<fo:region-after extent="25pt"/>
|
| 24 |
</fo:simple-page-master>
|
| 25 |
|
| 26 |
<fo:page-sequence-master master-name="psmOddEven" >
|
| 27 |
<fo:repeatable-page-master-alternatives>
|
| 28 |
<fo:conditional-page-master-reference master-reference="right"
|
| 29 |
page-position="first" />
|
| 30 |
<fo:conditional-page-master-reference master-reference="left"
|
| 31 |
odd-or-even="even" />
|
| 32 |
<fo:conditional-page-master-reference master-reference="right"
|
| 33 |
odd-or-even="odd" />
|
| 34 |
<!-- recommended fallback procedure -->
|
| 35 |
<fo:conditional-page-master-reference master-reference="rest" />
|
| 36 |
</fo:repeatable-page-master-alternatives>
|
| 37 |
</fo:page-sequence-master>
|
| 38 |
</fo:layout-master-set>
|
| 39 |
|
| 40 |
<fo:page-sequence id="N2528" master-reference="psmOddEven">
|
| 41 |
|
| 42 |
<fo:static-content flow-name="xsl-region-after">
|
| 43 |
<fo:block text-align-last="center" font-size="10pt">
|
| 44 |
<fo:page-number/>
|
| 45 |
</fo:block>
|
| 46 |
</fo:static-content>
|
| 47 |
|
| 48 |
<fo:flow flow-name="xsl-region-body">
|
| 49 |
<fo:block font-size="18pt" font-weight="bold">1. FOP test for images</fo:block>
|
| 50 |
<fo:block id="N2531">
|
| 51 |
|
| 52 |
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A GIF image in FOP</fo:block>
|
| 53 |
<fo:block>
|
| 54 |
<fo:external-graphic src="../graphics/xml_feather.gif"/>
|
| 55 |
</fo:block>
|
| 56 |
</fo:block>
|
| 57 |
<fo:block id="N2535">
|
| 58 |
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A transparent GIF image in FOP</fo:block>
|
| 59 |
<fo:block>
|
| 60 |
<fo:external-graphic src="../graphics/xml_feather_transparent.gif"/>
|
| 61 |
</fo:block>
|
| 62 |
</fo:block>
|
| 63 |
<fo:block id="N2545">
|
| 64 |
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A JPEG image in FOP</fo:block>
|
| 65 |
<fo:block>
|
| 66 |
<fo:external-graphic src="../graphics/fop.jpg"/>
|
| 67 |
</fo:block>
|
| 68 |
</fo:block>
|
| 69 |
<fo:block id="N2550">
|
| 70 |
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A BMP image in FOP</fo:block>
|
| 71 |
<fo:block>
|
| 72 |
<fo:external-graphic src="../graphics/linux.bmp"/>
|
| 73 |
</fo:block>
|
| 74 |
</fo:block>
|
| 75 |
<fo:block id="N2555">
|
| 76 |
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A PNG image in FOP</fo:block>
|
| 77 |
<fo:block>
|
| 78 |
<fo:external-graphic src="../graphics/asf-logo.png"/>
|
| 79 |
</fo:block>
|
| 80 |
</fo:block>
|
| 81 |
<fo:block id="N2556">
|
| 82 |
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A TIFF image in FOP</fo:block>
|
| 83 |
<fo:block>
|
| 84 |
<fo:external-graphic src="../graphics/asf-logo.tif"/>
|
| 85 |
</fo:block>
|
| 86 |
</fo:block>
|
| 87 |
<fo:block id="N2559">
|
| 88 |
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/>
|
| 89 |
This section is only required to show that the layout still works.
|
| 90 |
</fo:block>
|
| 91 |
</fo:flow>
|
| 92 |
|
| 93 |
</fo:page-sequence>
|
| 94 |
|
| 95 |
<fo:page-sequence id="N2561" master-reference="psmOddEven">
|
| 96 |
|
| 97 |
<fo:static-content flow-name="xsl-region-after">
|
| 98 |
<fo:block text-align-last="center" font-size="10pt">
|
| 99 |
<fo:page-number/>
|
| 100 |
</fo:block>
|
| 101 |
</fo:static-content>
|
| 102 |
|
| 103 |
<fo:flow flow-name="xsl-region-body" text-align="start" font-size="10pt">
|
| 104 |
<fo:block id="e-g-use" font-size="18pt" font-weight="bold">A. The usage of fo:external-graphic</fo:block>
|
| 105 |
<fo:block>
|
| 106 |
<fo:block>The image used in these examples has the following properties:</fo:block>
|
| 107 |
<fo:block start-indent="1cm">
|
| 108 |
<fo:block>169 x 51 px, 96 dpi, results in an intrinsic size of 44.715 x 13.494 mm</fo:block>
|
| 109 |
</fo:block>
|
| 110 |
<fo:block>
|
| 111 |
All the examples here will have a border="solid 0.1pt" to show the size of the viewport generated by the
|
| 112 |
external-graphic element and a background-color="yellow" to show what parts of the viewport are painted
|
| 113 |
upon by the image in the reference area. The image used is the non-transparent version of asf-logo.png:
|
| 114 |
file:../graphics/asf-logo-nt.png (nt=non-transparent)
|
| 115 |
</fo:block>
|
| 116 |
|
| 117 |
<fo:block keep-with-next.within-column="always">Properties: [none]</fo:block>
|
| 118 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 119 |
|
| 120 |
<fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm"</fo:block>
|
| 121 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 122 |
|
| 123 |
<fo:block keep-with-next.within-column="always">Properties: inline-progression-dimension="60mm" block-progression-dimension="20mm"</fo:block>
|
| 124 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" inline-progression-dimension="60mm" block-progression-dimension="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 125 |
|
| 126 |
<fo:block keep-with-next.within-column="always">Properties: width="30mm" height="20mm"</fo:block>
|
| 127 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="30mm" height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 128 |
|
| 129 |
<fo:block keep-with-next.within-column="always">Properties: width="30mm" height="20mm" overflow="hidden"</fo:block>
|
| 130 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="30mm" height="20mm" overflow="hidden" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 131 |
|
| 132 |
<fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm" text-align="center" display-align="center"</fo:block>
|
| 133 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm" text-align="center" display-align="center" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 134 |
|
| 135 |
<fo:block keep-with-next.within-column="always">Properties: content-height="20mm"</fo:block>
|
| 136 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 137 |
|
| 138 |
<fo:block keep-with-next.within-column="always">Properties: content-width="60mm" content-height="40mm"</fo:block>
|
| 139 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-width="60mm" content-height="40mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 140 |
|
| 141 |
<fo:block keep-with-next.within-column="always">Properties: content-width="60mm" content-height="40mm" scaling="non-uniform"</fo:block>
|
| 142 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-width="60mm" content-height="40mm" scaling="non-uniform" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 143 |
|
| 144 |
<fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm" content-width="scale-to-fit"</fo:block>
|
| 145 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm" content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 146 |
|
| 147 |
<fo:block keep-with-next.within-column="always">Properties: width="60mm" content-width="scale-to-fit"</fo:block>
|
| 148 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 149 |
|
| 150 |
<fo:block break-before="page"/>
|
| 151 |
<fo:block keep-with-next.within-column="always">Properties: width="100%" content-width="scale-to-fit"</fo:block>
|
| 152 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%" content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 153 |
<fo:block space-before="0.5em">
|
| 154 |
The following example shows how to fit an oversized image into the
|
| 155 |
available width, but not scale smaller images up. This is a work-around
|
| 156 |
until "scale-down-to-fit" is supported. The second feather below is in
|
| 157 |
a block-container with a width of 40mm to simulate an oversized image.
|
| 158 |
</fo:block>
|
| 159 |
<fo:block keep-with-next.within-column="always">Properties: width="100%" content-width="scale-to-fit" content-height="100%"</fo:block>
|
| 160 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%" content-width="scale-to-fit" content-height="100%" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 161 |
<fo:block-container width="40mm" background-color="lightgray">
|
| 162 |
<fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%" content-width="scale-to-fit" content-height="100%" border="solid 0.1pt" background-color="yellow"/></fo:block>
|
| 163 |
</fo:block-container>
|
| 164 |
</fo:block>
|
| 165 |
</fo:flow>
|
| 166 |
|
| 167 |
</fo:page-sequence>
|
| 168 |
|
| 169 |
</fo:root>
|
| 170 |
|