Commit 779e076d authored by John Zhang's avatar John Zhang

fop: new workload;

- loop through a directory of fop input files.
parent 551d176a
......@@ -38,7 +38,7 @@ eclipse:
fop:
script:
- ant -Dbuild.target-jar=dacapo.jar fop
- java -jar dacapo.jar fop -s small
- java -jar dacapo.jar fop
after_script:
- git clean -df -e "downloads"
......
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines page layout -->
<fo:layout-master-set>
<!-- layout for the first page -->
<fo:simple-page-master master-name="only"
page-height="29.7cm"
page-width="21cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-body
margin-top="3cm" margin-bottom="1.5cm"
margin-left="2cm" margin-right="2cm"/>
<fo:region-before precedence="true" extent="3cm"/>
<fo:region-after precedence="true" extent="1.5cm"/>
<fo:region-start extent="1cm"/>
<fo:region-end extent="1cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<!-- end: defines page layout -->
<!-- actual layout -->
<fo:page-sequence master-reference="only" initial-page-number="1">
<!-- usage of page layout -->
<!-- header -->
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="end"
font-size="10pt"
font-family="serif"
line-height="14pt" >
XML Recommendation - p. <fo:page-number/>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center"
font-size="10pt"
font-family="serif"
line-height="14pt" >
After
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-start">
<fo:block-container border-color="black" border-style="solid" border-width="1pt"
height="22.2cm" width="1cm" top="0cm" left="0cm" position="absolute">
<fo:block text-align="start" font-size="8pt"
font-family="serif" line-height="10pt">Start</fo:block>
</fo:block-container>
</fo:static-content>
<fo:static-content flow-name="xsl-region-end">
<fo:block-container border-color="black" border-style="solid" border-width="1pt"
height="22.2cm" width="1cm" top="0cm" left="0cm" position="absolute">
<fo:block text-align="start" font-size="8pt"
font-family="serif" line-height="10pt">End</fo:block>
</fo:block-container>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<!-- defines text title level 1-->
<fo:block font-size="18pt"
font-family="sans-serif"
line-height="24pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="center"
padding-top="0pt">
Extensible Markup Language (XML) 1.0
</fo:block>
<!-- defines text title level 2-->
<fo:block font-size="16pt"
font-family="sans-serif"
line-height="20pt"
space-before.optimum="10pt"
space-after.optimum="10pt"
text-align="start"
padding-top="0pt">
Abstract
</fo:block>
<!-- Normal text -->
<fo:block font-size="12pt"
font-family="sans-serif"
line-height="15pt"
space-after.optimum="3pt"
text-align="start">
The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to
enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML
has been designed for ease of implementation and for interoperability with both SGML and HTML. For further information
go to <fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link>
</fo:block>
<!-- defines text title level 2-->
<fo:block font-size="16pt"
font-family="sans-serif"
line-height="20pt"
space-before.optimum="10pt"
space-after.optimum="10pt"
text-align="start"
padding-top="0pt">
Status of this document
</fo:block>
<!-- Normal text -->
<fo:block font-size="12pt"
font-family="sans-serif"
line-height="15pt"
space-after.optimum="3pt"
text-align="start">
This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a
W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from
another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its
widespread deployment. This enhances the functionality and interoperability of the Web. For further information go to
<fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link>
</fo:block>
<!-- Normal text -->
<fo:block font-size="12pt"
font-family="sans-serif"
line-height="15pt"
space-after.optimum="3pt"
text-align="start">
This document specifies a syntax created by subsetting an existing, widely used international text processing standard
(Standard Generalized Markup Language, ISO 8879:1986(E) as amended and corrected) for use on the World Wide Web. It
is a product of the W3C XML Activity, details of which can be found at http://www.w3.org/XML. A list of current W3C
Recommendations and other technical documents can be found at http://www.w3.org/TR.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
This diff is collapsed.
<?xml version="1.0" encoding="ISO-8859-1"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="first"
page-width="21cm"
page-height="29.7cm"
margin-top="5mm">
<fo:region-body
margin-bottom="4.5in"
margin-right="5mm"
margin-left="5mm"
margin-top="5mm"/>
<fo:region-after
extent="4in" />
</fo:simple-page-master>
<fo:simple-page-master master-name="rest"
page-width="21cm"
page-height="29.7cm"
margin-right="5mm"
margin-left="5mm"
margin-top="5mm"
margin-bottom="5mm">
<fo:region-body/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="A4">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="first" page-position="first"/>
<fo:conditional-page-master-reference master-reference="rest" page-position="rest"/>
<fo:conditional-page-master-reference master-reference="rest"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body" font-size="12pt">
<fo:block font-size="14pt" font-weight="bold">
Example embedding Font
</fo:block>
<fo:block>
This example shows how to use an embedded font and
uses a free barcode font as an example. The barcode font is from
<fo:basic-link external-destination="http://www.geocities.com/keith_dimmock/">http://www.geocities.com/keith_dimmock/</fo:basic-link>
and is free.
</fo:block>
<fo:block>
To generate the PDF from this example, set the following build parameters
(for example in build-local.properties) and run "build examples" from the
top-level FOP source code directory.
<fo:block font-family="Courier" font-size="10pt" margin-left="2em">
<fo:block>fo.examples.dir = ./examples/fo/advanced</fo:block>
<fo:block>fo.examples.include = **/barcode.fo</fo:block>
<fo:block>fo.examples.userconfig = examples/fo/advanced/bar.conf.xml</fo:block>
<fo:block>fo.examples.force = true</fo:block>
</fo:block>
</fo:block>
<fo:block>
If the character encoding is correct in the generated PDF (bugzilla 5335), searching for "123456" should
find the first barcode, and "234567" the second.
</fo:block>
<fo:block font-weight="bold" space-before.optimum="2em">
First barcode: *ID123456*
</fo:block>
<fo:block
font-family="Barcode"
font-size="74pt">
*ID123456*
</fo:block>
<fo:block>
normal text, follows first barcode.
</fo:block>
<fo:block font-weight="bold" space-before.optimum="2em">
Second barcode: *ID234567* and some text
</fo:block>
<fo:block
font-family="Barcode, Helvetica"
font-size="74pt">
*ID234567* and some text
</fo:block>
<fo:block>
normal text, follows second barcode.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<?xml version="1.0" encoding="utf-8"?>
<!-- This example shows the simplest use of an fo:page-sequence-master (PSM),
having only a single fo:simple-page-master-reference.
Note that because only a single fo:simple-page-master-reference is being
used, this PSM can actually be omitted. Instead, the fo:page-sequence's
master-reference can be set directly to the master-name attribute
("SPM_Name") of the fo:simple-page-master (SPM).
Also note that using a single fo:single-page-master-reference (as opposed
to a fo:repeatable-page-master-reference) within the PSM limits you
to one (1) page for the referencing fo:page-sequence. If the fo:page-sequence's
master-reference is set to the master-name of the SPM, however, the number
of pages that can be output using that SPM is unbounded.
-->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines page layout -->
<fo:layout-master-set>
<!-- layout for the first page -->
<fo:simple-page-master master-name="SPM_Name"
page-height="29.7cm"
page-width="21cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-body margin-top="3cm"/>
<fo:region-before extent="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="PSM_Name">
<fo:single-page-master-reference master-reference="SPM_Name"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<!-- end: defines page layout -->
<!-- actual layout, note master-reference can alternatively be set to
SPM_Name as mentioned above -->
<fo:page-sequence master-reference="PSM_Name" initial-page-number="1">
<!-- usage of page layout -->
<!-- header -->
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="end"
font-size="10pt"
font-family="serif"
line-height="14pt">
XML Recommendation - p. <fo:page-number/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<!-- defines text title level 1-->
<fo:block font-size="18pt"
font-family="sans-serif"
line-height="24pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="center"
padding-top="0pt">
Extensible Markup Language (XML) 1.0
</fo:block>
<!-- defines text title level 2-->
<fo:block font-size="16pt"
font-family="sans-serif"
line-height="20pt"
space-before.optimum="10pt"
space-after.optimum="10pt"
text-align="start"
padding-top="0pt">
Abstract
</fo:block>
<!-- Normal text -->
<fo:block font-size="12pt"
font-family="sans-serif"
line-height="15pt"
space-after.optimum="3pt"
text-align="start">
The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to
enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML
has been designed for ease of implementation and for interoperability with both SGML and HTML. For further information
go to <fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link>
</fo:block>
<!-- defines text title level 2-->
<fo:block font-size="16pt"
font-family="sans-serif"
line-height="20pt"
space-before.optimum="10pt"
space-after.optimum="10pt"
text-align="start"
padding-top="0pt">
Status of this document
</fo:block>
<!-- Normal text -->
<fo:block font-size="12pt"
font-family="sans-serif"
line-height="15pt"
space-after.optimum="3pt"
text-align="start">
This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a
W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from
another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its
widespread deployment. This enhances the functionality and interoperability of the Web. For further information go to
<fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link>
</fo:block>
<!-- Normal text -->
<fo:block font-size="12pt"
font-family="sans-serif"
line-height="15pt"
space-after.optimum="3pt"
text-align="start">
This document specifies a syntax created by subsetting an existing, widely used international text processing standard
(Standard Generalized Markup Language, ISO 8879:1986(E) as amended and corrected) for use on the World Wide Web. It
is a product of the W3C XML Activity, details of which can be found at http://www.w3.org/XML. A list of current W3C
Recommendations and other technical documents can be found at http://www.w3.org/TR.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: bleed-and-crop-marks.fo 800143 2009-08-02 19:43:19Z jeremias $ -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"
font-family="sans-serif" font-size="9pt">
<fo:layout-master-set>
<fo:simple-page-master master-name="business-card"
page-width="84mm" page-height="53mm"
fox:bleed="3mm" fox:crop-box="media-box" fox:crop-offset="10mm" fox:scale="4">
<fo:region-body margin-bottom="3mm" margin-left="3mm" margin-right="3mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="business-card">
<fo:flow flow-name="xsl-region-body">
<fo:block-container id="crop-marks" absolute-position="fixed">
<fo:block line-height="1" font-size="0pt">
<fo:instream-foreign-object>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="84mm" height="53mm" viewBox="0 0 84 53" overflow="visible">
<style type="text/css"><![CDATA[
.line { fill:none; stroke:black; stroke-width:0.1 }
.colorbox { stroke:black; stroke-width:0.1 }
]]></style>
<defs>
<rect id="box" class="colorbox" width="5" height="4"/>
</defs>
<g id="cut-marks">
<polyline class="line" points="0,-3 0,-10" />
<polyline class="line" points="84,-3 84,-10" />
<polyline class="line" points="-3,0 -10,0" />
<polyline class="line" points="-3,53 -10,53" />
<polyline class="line" points="0,56 0,63" />
<polyline class="line" points="84,56 84,63" />
<polyline class="line" points="87,0 94,0" />
<polyline class="line" points="87,53 94,53" />
</g>
<g id="grays" transform="translate(88,4)">
<use xlink:href="#box" y="0" style="fill:rgb(0%,0%,0%)"/>
<use xlink:href="#box" y="4" style="fill:rgb(10%,10%,10%)"/>
<use xlink:href="#box" y="8" style="fill:rgb(20%,20%,20%)"/>
<use xlink:href="#box" y="12" style="fill:rgb(30%,30%,30%)"/>
<use xlink:href="#box" y="16" style="fill:rgb(40%,40%,40%)"/>
<use xlink:href="#box" y="20" style="fill:rgb(50%,50%,50%)"/>
<use xlink:href="#box" y="24" style="fill:rgb(60%,60%,60%)"/>
<use xlink:href="#box" y="28" style="fill:rgb(70%,70%,70%)"/>
<use xlink:href="#box" y="32" style="fill:rgb(80%,80%,80%)"/>
<use xlink:href="#box" y="36" style="fill:rgb(90%,90%,90%)"/>
<use xlink:href="#box" y="40" style="fill:rgb(100%,100%,100%)"/>
</g>
<g id="cyan" transform="translate(4,-9)">
<use xlink:href="#box" x="0" style="fill:rgb(0%,100%,100%)"/>
<use xlink:href="#box" x="5" style="fill:rgb(5%,100%,100%)"/>
<use xlink:href="#box" x="10" style="fill:rgb(25%,100%,100%)"/>
<use xlink:href="#box" x="15" style="fill:rgb(50%,100%,100%)"/>
<use xlink:href="#box" x="20" style="fill:rgb(75%,100%,100%)"/>
<use xlink:href="#box" x="25" style="fill:rgb(95%,100%,100%)"/>
</g>
<g id="magenta" transform="translate(50,-9)">
<use xlink:href="#box" x="0" style="fill:rgb(100%,0%,100%)"/>
<use xlink:href="#box" x="5" style="fill:rgb(100%,5%,100%)"/>
<use xlink:href="#box" x="10" style="fill:rgb(100%,25%,100%)"/>
<use xlink:href="#box" x="15" style="fill:rgb(100%,50%,100%)"/>
<use xlink:href="#box" x="20" style="fill:rgb(100%,75%,100%)"/>
<use xlink:href="#box" x="25" style="fill:rgb(100%,95%,100%)"/>
</g>
<g id="yellow" transform="translate(4,58)">
<use xlink:href="#box" x="0" style="fill:rgb(100%,100%,0%)"/>
<use xlink:href="#box" x="5" style="fill:rgb(100%,100%,5%)"/>
<use xlink:href="#box" x="10" style="fill:rgb(100%,100%,25%)"/>
<use xlink:href="#box" x="15" style="fill:rgb(100%,100%,50%)"/>
<use xlink:href="#box" x="20" style="fill:rgb(100%,100%,75%)"/>
<use xlink:href="#box" x="25" style="fill:rgb(100%,100%,95%)"/>
</g>
<g id="base-colors" transform="translate(50,58)">
<use xlink:href="#box" x="0" style="fill:red"/>
<use xlink:href="#box" x="5" style="fill:green"/>
<use xlink:href="#box" x="10" style="fill:blue"/>
<use xlink:href="#box" x="15" style="fill:cyan"/>
<use xlink:href="#box" x="20" style="fill:magenta"/>
<use xlink:href="#box" x="25" style="fill:yellow"/>
</g>
</svg>
</fo:instream-foreign-object>
</fo:block>
</fo:block-container>
<fo:block-container id="background" absolute-position="fixed"
inline-progression-dimension="84mm" block-progression-dimension="14mm"
overflow="visible">
<fo:block line-height="1" font-size="0pt">
<fo:instream-foreign-object>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="84mm" height="14mm" viewBox="0 0 84 14" overflow="visible">
<defs>
<linearGradient id="MyGradient">
<stop offset="0%" stop-color="#FF0000"/>
<stop offset="30%" stop-color="#FF0000"/>
<stop offset="55%" stop-color="#FFFFFF"/>
<stop offset="100%" stop-color="#FFFFFF"/>
</linearGradient>
</defs>
<rect x="-3" y="-3" width="87" height="17" style="fill:url(#MyGradient); stroke:none"/>
</svg>
</fo:instream-foreign-object>
</fo:block>
</fo:block-container>
<fo:block-container block-progression-dimension="14mm" display-align="center">
<fo:block font-weight="bold" font-size="9mm" line-height="1.5" color="white">ACME</fo:block>
</fo:block-container>
<fo:block start-indent="3mm" end-indent="3mm"/>
<fo:block text-align="end" space-before="3mm" space-before.conditionality="retain">
<fo:block font-size="14pt" font-weight="bold" space-after="2mm">
Pep Le Pew
</fo:block>
<fo:block font-size="12pt" space-after="4mm">
Expert d'Amour
</fo:block>
</fo:block>
<fo:block>
<fo:block>13 Pleasantstreet</fo:block>
<fo:block>Acme Acres</fo:block>
<fo:block>+1 (23) 456-7890</fo:block>
<fo:block>pepe@looney.toon</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<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-reference="one">
<fo:flow flow-name="xsl-region-body">
<fo:block text-align="center" font-size="16pt" font-weight="bold">
Block Containers
</fo:block>
<fo:block>
The fo:block-container object can be used to create an area with
a different writing mode or a different reference orientation.
The areas can be part of the flow or absolutely positioned.
</fo:block>
<fo:block>
This is a normal block container within the flow layout.
<fo:block-container>
<fo:block>
BC:A
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
This block container has a different reference orientation.
<fo:block-container reference-orientation="90" inline-progression-dimension="100pt">
<fo:block>
BC:B
</fo:block>
<fo:block>
The areas are stacked normally but the orientation of the
area is rotated 90 degrees anti-clockwise.
</fo:block>
<fo:block>
The blocks continue until exhausted as the layout
height of this container is fixed in the parent
block progression dimension. The clipping of the result
is determined by the overflow property. The block
progression dimension of this container is effectively
infinite.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
This block container has a different reference orientation.
<fo:block-container reference-orientation="270" inline-progression-dimension="100pt">
<fo:block>
BC:B II
</fo:block>
<fo:block>
The areas are stacked normally but the orientation of the
area is rotated 90 degrees clockwise.
</fo:block>
<fo:block>
The blocks continue until exhausted as the layout
height of this container is fixed in the parent
block progression dimension. The clipping of the result
is determined by the overflow property.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
This block container has a different reference orientation.
<fo:block-container reference-orientation="180" inline-progression-dimension="100pt">
<fo:block>
BC:B III
</fo:block>
<fo:block>
The areas are stacked normally but the orientation of the
area is rotated 180 degrees clockwise.
</fo:block>
<fo:block>
This block container behaves as part of the flow except
the contents are drawn rotated within the viewport by
180 degrees.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
different writing mode
<fo:block-container writing-mode="rl">
<fo:block>
BC:C
</fo:block>
<fo:block>
The areas in this block are stacked according to the rl (tb)
writing mode.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
The next block-container has an absolute position. It does
not affect the flow layout of other blocks.
<fo:block-container absolute-position="absolute"
left="20pt" top="400pt" right="220pt" bottom="550pt">
<fo:block>
BC:D
</fo:block>
<fo:block>
This is a normal block that is confined to the
block container.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
The next block-container has an absolute position. It does
not affect the flow layout of other blocks. This time with
the reference-orientation set.
<fo:block-container reference-orientation="270" absolute-position="absolute"
left="400pt" top="370pt" right="500pt" bottom="270pt">
<fo:block>
BC:E
</fo:block>
<fo:block>
This is a normal block that is confined to the
block container.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block break-after="page">
End of page.
</fo:block>
<fo:block>
The next block-container tests the clipping.
<fo:block-container reference-orientation="180" absolute-position="absolute"
right="100pt" bottom="550pt" left="200pt" top="700pt"
overflow="hidden">
<fo:block>
BC:F
</fo:block>
<fo:block>
This is a normal block that is confined to the
block container. It also has contents that are
larger than the block-container so that this text
will be clipped to the viewport.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
The next block-container tests error-if-overflow.
<fo:block-container reference-orientation="90" absolute-position="absolute"
bottom="220pt" left="600pt" top="320pt" right="700pt"
overflow="error-if-overflow">
<fo:block>
BC:G
</fo:block>
<fo:block>
This is a normal block that is confined to the
block container. It also has contents that are
larger than the block-container so that this text
will be clipped to the viewport.
</fo:block>
</fo:block-container>
</fo:block>