aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/documentation/content/xdocs/design/book.xml5
-rw-r--r--src/documentation/content/xdocs/design/extending.xml4
-rw-r--r--src/documentation/content/xdocs/dev/book.xml4
-rw-r--r--src/documentation/content/xdocs/dev/examples.xml48
-rw-r--r--src/documentation/content/xdocs/fo/align.fo68
-rw-r--r--src/documentation/content/xdocs/fo/align2.fo68
-rw-r--r--src/documentation/content/xdocs/fo/size.fo118
-rw-r--r--src/documentation/resources/images/fop.jpgbin0 -> 2339 bytes
-rw-r--r--src/documentation/sitemap.xmap11
9 files changed, 312 insertions, 14 deletions
diff --git a/src/documentation/content/xdocs/design/book.xml b/src/documentation/content/xdocs/design/book.xml
index 84da0fa9d..6f8fa0d98 100644
--- a/src/documentation/content/xdocs/design/book.xml
+++ b/src/documentation/content/xdocs/design/book.xml
@@ -6,6 +6,9 @@
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>
@@ -14,7 +17,7 @@
</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"/>
diff --git a/src/documentation/content/xdocs/design/extending.xml b/src/documentation/content/xdocs/design/extending.xml
index ae0938ec1..d0a954586 100644
--- a/src/documentation/content/xdocs/design/extending.xml
+++ b/src/documentation/content/xdocs/design/extending.xml
@@ -85,7 +85,9 @@ document into PDF markup.
</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>
diff --git a/src/documentation/content/xdocs/dev/book.xml b/src/documentation/content/xdocs/dev/book.xml
index ef98ef0ba..44c8096cc 100644
--- a/src/documentation/content/xdocs/dev/book.xml
+++ b/src/documentation/content/xdocs/dev/book.xml
@@ -13,12 +13,14 @@
<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>
diff --git a/src/documentation/content/xdocs/dev/examples.xml b/src/documentation/content/xdocs/dev/examples.xml
index 89975a21d..1773b58db 100644
--- a/src/documentation/content/xdocs/dev/examples.xml
+++ b/src/documentation/content/xdocs/dev/examples.xml
@@ -1,14 +1,44 @@
<?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>
diff --git a/src/documentation/content/xdocs/fo/align.fo b/src/documentation/content/xdocs/fo/align.fo
new file mode 100644
index 000000000..6c9449a7a
--- /dev/null
+++ b/src/documentation/content/xdocs/fo/align.fo
@@ -0,0 +1,68 @@
+<?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>
+
diff --git a/src/documentation/content/xdocs/fo/align2.fo b/src/documentation/content/xdocs/fo/align2.fo
new file mode 100644
index 000000000..8c85414d5
--- /dev/null
+++ b/src/documentation/content/xdocs/fo/align2.fo
@@ -0,0 +1,68 @@
+<?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>
+
diff --git a/src/documentation/content/xdocs/fo/size.fo b/src/documentation/content/xdocs/fo/size.fo
new file mode 100644
index 000000000..ae6f763e2
--- /dev/null
+++ b/src/documentation/content/xdocs/fo/size.fo
@@ -0,0 +1,118 @@
+<?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>
+
diff --git a/src/documentation/resources/images/fop.jpg b/src/documentation/resources/images/fop.jpg
new file mode 100644
index 000000000..8fe6ca9ff
--- /dev/null
+++ b/src/documentation/resources/images/fop.jpg
Binary files differ
diff --git a/src/documentation/sitemap.xmap b/src/documentation/sitemap.xmap
index c6adaf1f3..1aa7af81b 100644
--- a/src/documentation/sitemap.xmap
+++ b/src/documentation/sitemap.xmap
@@ -352,10 +352,17 @@
<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>