copyright="@year@ The Apache Software Foundation"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <menu label="Index">
+ <menu-item label="FOP Home" href="../index.html"/>
+ </menu>
<menu label="About">
<menu-item label="Index" href="index.html"/>
</menu>
</menu>
<menu label="Sections">
<menu-item label="FO Tree" href="fotree.html"/>
- <menu-item label="Propterties" href="properties.html"/>
+ <menu-item label="Properties" href="properties.html"/>
<menu-item label="Layout" href="layout.html"/>
<menu-item label="Area Tree" href="areas.html"/>
<menu-item label="Renderers" href="renderers.html"/>
</p>
<p>
eg.
-<source><![CDATA[<my:script-link script="app.execMenuItem('AcroSrch:Query');">Search</my:script-link>]]></source>
+<source><![CDATA[<my:script-link script="app.execMenuItem('AcroSrch:Query');">
+Search
+</my:script-link>]]></source>
to result in a text box referencing the following PDF action:
<source><![CDATA[<< /S /JavaScript /JS (app.execMenuItem("AcroSrch:Query");) >>]]></source>
<menu-item label="Index" href="index.html"/>
<menu-item label="FAQs" href="faq.html"/>
<menu-item label="Examples" href="examples.html"/>
- <menu-item label="SVG" href="svg.html"/>
</menu>
<menu label="Using">
<menu-item label="Extensions" href="extensions.html"/>
<menu-item label="Configuration" href="configuration.html"/>
</menu>
+ <menu label="Extras">
+ <menu-item label="SVG" href="svg.html"/>
+ </menu>
<menu label="Developers">
<menu-item label="Design" href="../design/index.html"/>
</menu>
<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
- <document>
- <header>
- <title>FO Examples</title>
- </header>
- <body>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
+<document>
+ <header>
+ <title>FO Examples</title>
+ </header>
+ <body>
+ <section>
+ <title>Example Documents Using FOP</title>
+ <p>
+ These examples have been rendered using FOP.
+ </p>
+ </section>
<section>
- <title></title>
+ <title>Images Examples</title>
<p>
+Embedding images in FO:
+ <table>
+ <caption>Images in FO</caption>
+ <tr>
+ <th>description</th>
+ <th>fo file</th>
+ <th>pdf result</th>
+ </tr>
+ <tr>
+ <td>align in larger viewport</td>
+ <td><link href="../fo/align.fo">align.fo</link></td>
+ <td><link href="../fo/align.fo.pdf">align.fo.pdf</link></td>
+ </tr>
+ <tr>
+ <td>align in smaller viewport</td>
+ <td><link href="../fo/align2.fo">align2.fo</link></td>
+ <td><link href="../fo/align2.fo.pdf">align2.fo.pdf</link></td>
+ </tr>
+ <tr>
+ <td>scaling image</td>
+ <td><link href="../fo/size.fo">size.fo</link></td>
+ <td><link href="../fo/size.fo.pdf">size.fo.pdf</link></td>
+ </tr>
+ </table>
</p>
</section>
- </body>
- </document>
+ </body>
+</document>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<fo:root font-family="Times Roman" font-size="12pt" text-align="center" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<fo:layout-master-set>
+ <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">
+ <fo:region-before extent="1cm"/>
+ <fo:region-body margin-top="1cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+
+</fo:layout-master-set>
+
+<fo:page-sequence id="N2528" master-reference="left">
+
+<fo:static-content flow-name="xsl-region-after">
+ <fo:block text-align-last="center" font-size="10pt">
+ <fo:page-number/>
+ </fo:block>
+</fo:static-content>
+
+<fo:flow flow-name="xsl-region-body">
+<fo:block font-size="18pt" font-weight="bold">1. FOP test for images</fo:block>
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Align in Larger Viewport</fo:block>
+ <fo:block>
+Default align:
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" src="images/fop.jpg"/>), start
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" src="images/fop.jpg"/>), end
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" src="images/fop.jpg"/>), center
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" src="images/fop.jpg"/>), before
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="before" src="images/fop.jpg"/>), after
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="after" src="images/fop.jpg"/>), center
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="center" src="images/fop.jpg"/>).
+ </fo:block>
+ <fo:block>
+Default align:
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" src="images/fop.jpg"/>), start-before
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="before" src="images/fop.jpg"/>), start-after
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="after" src="images/fop.jpg"/>), start-center
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="center" src="images/fop.jpg"/>), center-before
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="before" src="images/fop.jpg"/>), center-center
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="center" src="images/fop.jpg"/>), center-after
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="after" src="images/fop.jpg"/>).
+ </fo:block>
+
+ <fo:block>
+end-before
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="before" src="images/fop.jpg"/>), end-center
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="center" src="images/fop.jpg"/>), end-after
+(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="after" src="images/fop.jpg"/>).
+ </fo:block>
+
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/>
+ This section is only required to show that the layout still works.
+</fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+</fo:root>
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<fo:root font-family="Times Roman" font-size="12pt" text-align="center" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<fo:layout-master-set>
+ <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">
+ <fo:region-before extent="1cm"/>
+ <fo:region-body margin-top="1cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+
+</fo:layout-master-set>
+
+<fo:page-sequence id="N2528" master-reference="left">
+
+<fo:static-content flow-name="xsl-region-after">
+ <fo:block text-align-last="center" font-size="10pt">
+ <fo:page-number/>
+ </fo:block>
+</fo:static-content>
+
+<fo:flow flow-name="xsl-region-body">
+<fo:block font-size="18pt" font-weight="bold">1. FOP test for images</fo:block>
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Align in Smaller Viewport</fo:block>
+ <fo:block>
+Default align:
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" src="images/fop.jpg"/>), start
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="start" src="images/fop.jpg"/>), center
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="center" src="images/fop.jpg"/>), end
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="end" src="images/fop.jpg"/>), before
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" display-align="before" src="images/fop.jpg"/>), after
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" display-align="after" src="images/fop.jpg"/>), center
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" display-align="center" src="images/fop.jpg"/>).
+ </fo:block>
+ <fo:block>
+Default align:
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" src="images/fop.jpg"/>), start-before
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="start" src="images/fop.jpg"/>), start-center
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="center" src="images/fop.jpg"/>), start-after
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="after" src="images/fop.jpg"/>), center-before
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="before" src="images/fop.jpg"/>), center-after
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="after" src="images/fop.jpg"/>), center-center
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="center" src="images/fop.jpg"/>).
+ </fo:block>
+
+ <fo:block>
+end-before
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="before" src="images/fop.jpg"/>), end-after
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="after" src="images/fop.jpg"/>), end-center
+(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="center" src="images/fop.jpg"/>).
+ </fo:block>
+
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/>
+ This section is only required to show that the layout still works.
+</fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+</fo:root>
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<fo:root font-family="Times Roman" font-size="12pt" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<fo:layout-master-set>
+ <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">
+ <fo:region-before extent="0.5cm"/>
+ <fo:region-body margin-top="0.5cm" margin-bottom="1.7cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+
+</fo:layout-master-set>
+
+<fo:page-sequence id="N2528" master-reference="left">
+
+<fo:static-content flow-name="xsl-region-after">
+ <fo:block text-align-last="center" font-size="10pt">
+ <fo:page-number/>
+ </fo:block>
+</fo:static-content>
+
+<fo:flow flow-name="xsl-region-body">
+<fo:block font-size="18pt" font-weight="bold" text-align="center">1. FOP test for images</fo:block>
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Normal</fo:block>
+ <fo:block>
+The image (<fo:external-graphic src="images/fop.jpg"/>) is placed normally.
+ </fo:block>
+</fo:block>
+
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic content-width="50pt" content-height="50pt" src="images/fop.jpg"/>)
+has the content size set.
+ </fo:block>
+</fo:block>
+
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic width="150pt" height="50pt" src="images/fop.jpg"/>)
+has the width and height set.
+ </fo:block>
+</fo:block>
+
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic inline-progression-dimension.optimum="150pt" block-progression-dimension.optimum="50pt" src="images/fop.jpg"/>)
+has the ipd and bpd set.
+ </fo:block>
+</fo:block>
+
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Clipped</fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic width="100pt" height="100pt" content-width="200pt" content-height="200pt" overflow="hidden" src="images/fop.jpg"/>)
+is clipped with the content size double the viewport size.
+ </fo:block>
+</fo:block>
+
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Clipped</fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic width="50pt" height="50pt" overflow="error-if-overflow" src="images/fop.jpg"/>)
+is clipped with the content size double the viewport size.
+This has <fo:inline font-style="italic">error-if-overflow</fo:inline>
+set so there should be an error reported, it can recover from the
+error by clipping to the viewport.
+ </fo:block>
+</fo:block>
+
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Scaling</fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic content-width="100pt" content-height="50pt" scaling="non-uniform" src="images/fop.jpg"/>)
+has non-uniform scaling.
+ </fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic content-width="50pt" content-height="100pt" scaling="non-uniform" src="images/fop.jpg"/>)
+has non-uniform scaling.
+ </fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic content-width="100pt" content-height="75pt" scaling="uniform" src="images/fop.jpg"/>)
+has uniform scaling.
+ </fo:block>
+ <fo:block>
+The image
+(<fo:external-graphic content-width="75pt" content-height="100pt" scaling="uniform" src="images/fop.jpg"/>)
+has uniform scaling.
+ </fo:block>
+</fo:block>
+
+<fo:block>
+ <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/>
+ This section is only required to show that the layout still works.
+</fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+</fo:root>
+
<map:serialize type="svg2pdf"/>
</map:match>
- <map:match pattern="*/fo/*.fo">
+ <map:match pattern="fo/*.fo">
+ <map:read src="content/xdocs/fo/{1}.fo" mime-type="text/xml"/>
+ </map:match>
+ <map:match pattern="fo/*.fo.pdf">
+ <map:generate src="content/xdocs/fo/{1}.fo"/>
+ <map:serialize type="fo2pdf"/>
+ </map:match>
+ <map:match pattern="**/fo/*.fo">
<map:read src="content/xdocs/{1}/fo/{2}.fo" mime-type="text/xml"/>
</map:match>
- <map:match pattern="*/fo/*.fo.pdf">
+ <map:match pattern="**/fo/*.fo.pdf">
<map:generate src="content/xdocs/{1}/fo/{2}.fo"/>
<map:serialize type="fo2pdf"/>
</map:match>