]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
added some image examples
authorKeiron Liddle <keiron@apache.org>
Fri, 8 Nov 2002 09:25:34 +0000 (09:25 +0000)
committerKeiron Liddle <keiron@apache.org>
Fri, 8 Nov 2002 09:25:34 +0000 (09:25 +0000)
some minor fixes

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195448 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/design/book.xml
src/documentation/content/xdocs/design/extending.xml
src/documentation/content/xdocs/dev/book.xml
src/documentation/content/xdocs/dev/examples.xml
src/documentation/content/xdocs/fo/align.fo [new file with mode: 0644]
src/documentation/content/xdocs/fo/align2.fo [new file with mode: 0644]
src/documentation/content/xdocs/fo/size.fo [new file with mode: 0644]
src/documentation/resources/images/fop.jpg [new file with mode: 0644]
src/documentation/sitemap.xmap

index 84da0fa9d92536a4d939765e961bc223b60a9ebf..6f8fa0d986f2f2408e92b9601b7c00f96583d94b 100644 (file)
@@ -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"/>
index ae0938ec1246b5e7b61dad340f02038556bc6b59..d0a954586bfc1e7cb700c41e2f827c07b3153c91 100644 (file)
@@ -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>
index ef98ef0ba95d72f1966f0000d055286bbe9fc443..44c8096cce20624f24c9788b51f2482f4df585a9 100644 (file)
       <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>
index 89975a21d293e7da811abd0332f230c2e8107a26..1773b58db4b3421646fdea3810d867377c967b0e 100644 (file)
@@ -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 (file)
index 0000000..6c9449a
--- /dev/null
@@ -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 (file)
index 0000000..8c85414
--- /dev/null
@@ -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 (file)
index 0000000..ae6f763
--- /dev/null
@@ -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 (file)
index 0000000..8fe6ca9
Binary files /dev/null and b/src/documentation/resources/images/fop.jpg differ
index c6adaf1f3e49be87d85f5e1cc9d9ebc544cc41f1..1aa7af81b246930fe640785e25f1f5c6fefca112 100644 (file)
     <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>