diff options
Diffstat (limited to 'examples/fo/basic')
24 files changed, 10117 insertions, 0 deletions
diff --git a/examples/fo/basic/alignment.fo b/examples/fo/basic/alignment.fo new file mode 100644 index 000000000..24c4f9f94 --- /dev/null +++ b/examples/fo/basic/alignment.fo @@ -0,0 +1,207 @@ +<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="20pt" margin-right="20pt" /> + </fo:simple-page-master> +</fo:layout-master-set> +<fo:page-sequence master-reference="one"> +<fo:flow flow-name="xsl-region-body"> + <fo:block><fo:inline font-weight="bold">Ex 1:</fo:inline> This +is a longer line of text that provides a context for the line with the images aligned on it. +This is a line with before-edge +<fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="50"> + <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="47" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 42l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="40"> + <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="40" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, middle<fo:instream-foreign-object vertical-align="middle"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="3" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, and no<fo:instream-foreign-object> +<svg:svg width="25" height="40"> + <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="40" style="stroke:black;stroke-width:1.5"/> +</svg:svg> +</fo:instream-foreign-object> alignment. +And this is the line of text that follows the line with the aligned objects on it. +And finally, this line illustrates the normal spacing between lines of text in this font. +</fo:block> + +<fo:block space-after="15pt"><fo:leader leader-pattern="rule"/></fo:block> + + <fo:block><fo:inline font-weight="bold">Ex 2:</fo:inline> This +is a longer line of text that provides a context for the line with the images aligned on it. +This is a line with before-edge +<fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="50"> + <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="47" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 42l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="40"> + <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="40" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, middle<fo:instream-foreign-object vertical-align="middle"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="3" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object> alignment. +And this is the line of text that follows the line with the aligned objects on it. +And finally, this line illustrates the normal spacing between lines of text in this font. +</fo:block> + +<fo:block space-after="15pt"><fo:leader leader-pattern="rule"/></fo:block> + + <fo:block><fo:inline font-weight="bold">Ex 3:</fo:inline> This +is a longer line of text that provides a context for the line with the images aligned on it. +This is a line with before-edge +<fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="50"> + <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="47" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 42l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="40"> + <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="40" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object> alignment. +And this is the line of text that follows the line with the aligned objects on it. +And finally, this line illustrates the normal spacing between lines of text in this font. +</fo:block> + +<fo:block space-after="15pt"><fo:leader leader-pattern="rule"/></fo:block> + + <fo:block><fo:inline font-weight="bold">Ex 4:</fo:inline> This +is a longer line of text that provides a context for the line with the images aligned on it. +This is a line with before-edge +<fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="40"> + <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="37" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 32l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="50"> + <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="50" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object> alignment. +And this is the line of text that follows the line with the aligned objects on it. +And finally, this line illustrates the normal spacing between lines of text in this font. +</fo:block> + +<fo:block space-after="15pt"><fo:leader leader-pattern="rule"/></fo:block> + + <fo:block><fo:inline font-weight="bold">Ex 5:</fo:inline> This +is a longer line of text that provides a context for the line with the images aligned on it. +This is a line with before-edge +<fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top"> +<svg:svg width="25" height="40"> + <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="0" x2="12.5" y2="37" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 32l7.5 8l7.5 -8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom"> +<svg:svg width="25" height="50"> + <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="2" x2="12.5" y2="50" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object>, middle<fo:instream-foreign-object vertical-align="middle"> +<svg:svg width="25" height="25"> + <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/> + <svg:line x1="12.5" y1="3" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/> + <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/> + <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/> +</svg:svg> +</fo:instream-foreign-object> alignment. +And this is the line of text that follows the line with the aligned objects on it. +And finally, this line illustrates the normal spacing between lines of text in this font. +</fo:block> + +<fo:block space-after="15pt"><fo:leader leader-pattern="rule"/></fo:block> + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/blockcontainer.fo b/examples/fo/basic/blockcontainer.fo new file mode 100644 index 000000000..2abe4d329 --- /dev/null +++ b/examples/fo/basic/blockcontainer.fo @@ -0,0 +1,170 @@ +<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 effect 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 effect the flow layout of other blocks. This time with + the reference-orientation set. + <fo:block-container reference-orientation="270" absolute-position="absolute" + left="270pt" top="400pt" right="370pt" bottom="500pt"> + <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" + left="100pt" top="550pt" right="200pt" bottom="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" + left="220pt" top="600pt" right="320pt" bottom="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> + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/border.fo b/examples/fo/basic/border.fo new file mode 100644 index 000000000..7bef67c7c --- /dev/null +++ b/examples/fo/basic/border.fo @@ -0,0 +1,189 @@ +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master + margin-right="0.5cm" margin-left="0.5cm" margin-bottom="0.5cm" margin-top="0.75cm" + page-width="21cm" page-height="29.7cm" master-name="first"> + <fo:region-body></fo:region-body> + </fo:simple-page-master> + <fo:simple-page-master + margin-right="2.5cm" margin-left="2.5cm" margin-bottom="2cm" margin-top="1cm" + page-width="21cm" page-height="29.7cm" master-name="rest"> + <fo:region-body></fo:region-body> + </fo:simple-page-master> + + <fo:page-sequence-master master-name="psmA"> + <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" /> + <!-- recommended fallback procedure --> + <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="psmA"> + <fo:flow flow-name="xsl-region-body"> + <fo:block-container height="4cm" width="12cm" top="0cm" left="0cm" position="absolute"> + <fo:block text-align="start" line-height="18pt" font-family="sans-serif" font-weight="bold" font-size="14pt"> + PX7.net + </fo:block> + <fo:block text-align="start" line-height="18pt" font-family="sans-serif" font-weight="bold" font-size="14pt"> + 44 Liberty St + </fo:block> + <fo:block text-align="start" line-height="18pt" font-family="sans-serif" font-weight="bold" font-size="14pt"> + Newburyport, MA 01950 + </fo:block> + <fo:block text-align="start" line-height="18pt" font-family="sans-serif" font-weight="bold" font-size="14pt"> + 978-462-1152 + </fo:block> + </fo:block-container> + <fo:block-container height="1cm" width="6cm" top="0cm" left="14cm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="22pt" font-family="sans-serif" font-size="23pt"> + Sales Receipt + </fo:block> + </fo:block-container> + + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="2.49cm" top="1.2cm" left="13.8cm" padding=".6mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="12pt"> + DATE + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="2.49cm" top="1.87cm" left="13.8cm" padding=".6mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="10pt"> + 01/01/2000 + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="2.49cm" top="1.2cm" left="16.46cm" padding=".6mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="12pt"> + SALE # + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="2.49cm" top="1.87cm" left="16.46cm" padding=".6mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="10pt"> + 1 + </fo:block> + </fo:block-container> + + + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="8.95cm" top="3cm" left="0cm" padding=".6mm" position="absolute"> + <fo:block text-align="start" line-height="14pt" font-family="sans-serif" font-size="12pt"> + SOLD TO + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="3cm" width="8.95cm" top="3.67cm" left="0cm" padding=".6mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="12pt"> + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="8.95cm" top="3cm" left="10cm" padding=".6mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="12pt"> + SHIP TO + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="3cm" width="8.95cm" top="3.67cm" left="10cm" padding=".6mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="12pt"> + </fo:block> + </fo:block-container> + + + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="3.96cm" top="7.25cm" left="10.74cm" padding="1mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="12pt"> + PMT METHOD + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="3.96cm" top="8cm" left="10.74cm" padding="1mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="10pt"> + Check + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="3.96cm" top="7.25cm" left="14.95cm" padding="1mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="12pt"> + CHECK # + </fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width=".5mm" height="0.5cm" width="3.96cm" top="8cm" left="14.95cm" padding="1mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="14pt" font-family="sans-serif" font-size="10pt"> + 1234 + </fo:block> + </fo:block-container> + + + <fo:block-container height="17cm" width="19cm" top="9.4cm" left="0cm" position="absolute"> + <fo:table border-collapse="separate" border-color="yellow" border-style="solid" border-width=".6mm" height="17cm"> + <fo:table-column column-width="2.5cm"/> + <fo:table-column column-width="11.5cm"/> + <fo:table-column column-width="2.5cm"/> + <fo:table-column column-width="2.5cm"/> + <fo:table-body font-family="sans-serif" font-weight="normal" font-size="10pt"> + <fo:table-row line-height="12pt"> + <fo:table-cell border-width="1pt" border-color="green" border-style="solid" padding="1mm"> + <fo:block text-align="end">QUANTITY</fo:block> + </fo:table-cell> + <fo:table-cell border-width="1pt" border-color="red" border-style="solid" padding="1mm"> + <fo:block text-align="start">DESCRIPTION</fo:block> + </fo:table-cell> + <fo:table-cell border-color="blue" border-style="solid" padding="1mm"> + <fo:block text-align="center">RATE</fo:block> + </fo:table-cell> + <fo:table-cell border-color="orange" border-style="solid" padding="1mm"> + <fo:block text-align="center">AMOUNT</fo:block> + </fo:table-cell> + + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">1</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="start">Wide Widget</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">$22.23</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">22.31</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">1</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="start">Widget</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">$22.23</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">22.31</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">3</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="start">Nuts</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">$12.00</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:block text-align="end">36.00</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width="0.5mm" height="1cm" width="13.31cm" top="26.5cm" left="0cm" padding="1mm" position="absolute"> + <fo:block text-align="start" line-height="15pt" font-family="sans-serif" font-size="12pt">Please remit to the above address</fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width="0.5mm" height="1cm" width="2.5cm" top="26.5cm" left="13.56cm" padding="1mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="25pt" font-family="sans-serif" font-size="22pt">Total</fo:block> + </fo:block-container> + <fo:block-container border-color="black" border-style="solid" border-width="0.5mm" height="1cm" width="2.5cm" top="26.5cm" left="16.31cm" padding="1mm" position="absolute"> + <fo:block text-align="start" space-after.optimum="3pt" line-height="15pt" font-family="sans-serif" font-size="10pt">$3.00</fo:block> + </fo:block-container> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/bordershorthand.fo b/examples/fo/basic/bordershorthand.fo new file mode 100644 index 000000000..6c5282846 --- /dev/null +++ b/examples/fo/basic/bordershorthand.fo @@ -0,0 +1,169 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<!-- example for a simple fo file. At the beginning the page layout is set. +Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations, +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + - page-sequence-masters: have the role of describing the sequence + of page-masters that will be used to generate + pages during the formatting of an fo:page-sequence + + --> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + page-height="29.7cm" + page-width="21cm" + margin-top="1cm" + margin-bottom="2cm" + margin-left="2.0cm + 0.5cm" + margin-right="(5cm * 1cm) div 2cm"> + <fo:region-body margin-top="3cm"/> + <fo:region-before extent="3cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + page-height="abs(-30cm + .3cm)" + page-width="(10cm * 2) + 1cm" + margin-top="round(.5) * 1cm" + margin-bottom="round(2.4) * 1cm" + margin-left="2.5 * 1cm" + margin-right="5.5cm - 3cm"> + <fo:region-body margin-top="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <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" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="basicPSM"> + + <!-- header --> + <fo:static-content flow-name="xsl-region-before"> + <fo:block text-align="end" + font-size="10pt" + font-family="serif" + line-height="1em + 4pt" + > + Border and Padding Shorthand Tests - 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="min(18pt,20pt)" + font-family="sans-serif" + line-height="max(24pt,18pt)" + space-after.optimum="5 mod 3 * 7.5pt" + background-color="rgb(128,128,128)" + color="rgb(255,255,255)" + text-align="center" + padding-top="3pt"> + Border and Padding Shorthand Tests + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="12pt" + text-align="start" + background-color="rgb(150,150,150)" + start-indent="3mm" end-indent="3mm" + padding-left="3mm" padding-right="3mm" + padding-top="4mm" padding-bottom="4mm" + border-style="dashed" + border-left-width="1pt" border-right-width="1pt" + border-top-width="2pt" border-bottom-width="2pt" + border-top-color="rgb(100,100,100)" border-bottom-color="rgb(200,200,200)"> +In this example, padding and border properties are specified using absolute properties: +padding-left, padding-right, padding-top, and padding-bottom, etc. +According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified. +</fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="12pt" + text-align="start" + background-color="rgb(150,150,150)" + start-indent="3mm" end-indent="3mm" + padding="3mm + 1mm 3mm" + border-top="rgb(100,100,100) 1pt + 1pt dashed" + border-bottom="2pt rgb(200,200,200) solid" + border-left="solid 1pt" border-right="solid 1pt"> +In this example, padding and border properties are specified using shorthand properties: +padding, border-width, border-color. +According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified. +</fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="3pt" + text-align="start" + background-color="rgb(150,150,150)" + start-indent="3mm" end-indent="3mm" + padding-before="4mm" padding-after="4mm" + padding-start.length="3mm" padding-end.length="3mm" + border-style="solid" + border-start-width="1pt" border-end-width="1pt" + border-before-width="2pt" border-after-width="2pt" + border-before-color="rgb(100,100,100)" + border-after-color="rgb(200,200,200)"> +In this example, padding and border properties are specified using writing-mode relative properties: +padding-before, padding-after, padding-start, and padding-end, etc. +According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified. +</fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="3pt" + text-align="start" + background-color="rgb(200,200,200)" + start-indent="3mm" end-indent="3mm" + padding = "3mm" + padding-before="4mm" padding-after="4mm" + border-width = "2pt" border-style="solid" + border-color="black" + border-start-width="1pt" border-end-width="1pt" + border-before-width="2pt" border-after-width="2pt" + border-before-color="rgb(200,200,200)" + border-after-color="rgb(100,100,100)"> +In this example, padding and border properties are specified using +shorthand and writing-mode relative properties: +padding-before, padding-after, padding-start, and padding-end, etc. +According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified. +</fo:block> + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/character.fo b/examples/fo/basic/character.fo new file mode 100644 index 000000000..8771baa3c --- /dev/null +++ b/examples/fo/basic/character.fo @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- example for a simple fo file. At the beginning the page layout is set. + Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions +--> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + In this case there is only a simple-page-master which defines the + layout for all pages of the text + --> + <!-- layout information --> + <fo:simple-page-master master-name="simple" + 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:layout-master-set> + <!-- end: defines page layout --> + + + <!-- start page-sequence + here comes the text (contained in flow objects) + the page-sequence can contain different fo:flows + the attribute value of master-name refers to the page layout + which is to be used to layout the text contained in this + page-sequence--> + <fo:page-sequence master-reference="simple"> + + <!-- start fo:flow + each flow is targeted + at one (and only one) of the following: + xsl-region-body (usually: normal text) + xsl-region-before (usually: header) + xsl-region-after (usually: footer) + xsl-region-start (usually: left margin) + xsl-region-end (usually: right margin) + ['usually' applies here to languages with left-right and top-down + writing direction like English] + in this case there is only one target: xsl-region-body + --> + <fo:flow flow-name="xsl-region-body" + text-align="justify"> + + <!-- each paragraph is encapsulated in a block element + the attributes of the block define + font-family and size, line-heigth etc. --> + + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + > +1. Why <fo:character character="T" font-size="16pt" color="red"/><fo:character character="E" font-size="16pt" color="blue"/><fo:character character="I" font-size="16pt" color="green"/>? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. <fo:character character="Y"/>ou should use it too. +Why T<fo:character character="E"/>I? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. <fo:character character="Y"/>ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. <fo:character character="Y"/>ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. <fo:character character="Y"/>ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. <fo:character character="Y"/>ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. <fo:character character="Y"/>ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. <fo:character character="Y"/>ou should use it too. + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + > +1. Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. ou should use it too. +Why TEI? I know, you know, I know (Paul Grice). Using TEI is quite a challenge. ou should use it too. + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + > +1. Why TEI? Using <fo:inline text-decoration="underline">TEI</fo:inline> is quite a challenge. <fo:character character="Y" font-size="16pt" />ou should use it too. + </fo:block> + + </fo:flow> <!-- closes the flow element--> + </fo:page-sequence> <!-- closes the page-sequence --> +</fo:root> diff --git a/examples/fo/basic/corresprop.fo b/examples/fo/basic/corresprop.fo new file mode 100644 index 000000000..565e35fe5 --- /dev/null +++ b/examples/fo/basic/corresprop.fo @@ -0,0 +1,237 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<!-- example for a simple fo file. At the beginning the page layout is set. +Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations, +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + - page-sequence-masters: have the role of describing the sequence + of page-masters that will be used to generate + pages during the formatting of an fo:page-sequence + + --> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + page-height="29.7cm" + page-width="21cm" + margin-top="1cm" + margin-bottom="2cm" + margin-left="2.0cm + 0.5cm" + margin-right="(5cm * 1cm) div 2cm"> + <fo:region-body margin-top="3cm"/> + <fo:region-before extent="3cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + page-height="abs(-30cm + .3cm)" + page-width="(10cm * 2) + 1cm" + margin-top="round(.5) * 1cm" + margin-bottom="round(2.4) * 1cm" + margin-left="2.5 * 1cm" + margin-right="5.5cm - 3cm"> + <fo:region-body margin-top="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <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" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="basicPSM"> + + <!-- header --> + <fo:static-content flow-name="xsl-region-before"> + <fo:block text-align="end" + font-size="10pt" + font-family="serif" + line-height="1em + 4pt" > + Corresponding Property Tests - 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="min(18pt,20pt)" + font-family="sans-serif" + line-height="max(24pt,18pt)" + space-after.optimum="5 mod 3 * 7.5pt" + background-color="rgb(0,0,255)" + color="rgb(255,255,255)" + text-align="center" + padding-top="3pt"> + Corresponding Property Tests + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="12pt" + text-align="start" + background-color="rgb(200,200,200)" + start-indent="3mm" end-indent="3mm" + padding-left="3mm" padding-right="3mm" + padding-top="4mm" padding-bottom="4mm" + border-left-width="1pt" border-right-width="1pt" + border-top-width="2pt" border-bottom-width="2pt" + border-top-color="red" border-bottom-color="blue"> +In this example, padding and border properties are specified using absolute properties: +padding-left, padding-right, padding-top, and padding-bottom, etc. +According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified. +</fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="3pt" + text-align="start" + background-color="rgb(200,200,200)" + start-indent="3mm" end-indent="3mm" + padding-before="4mm" padding-after="4mm" + padding-start.length="3mm" padding-end.length="3mm" + border-start-width="1pt" border-end-width="1pt" + border-before-width="2pt" border-after-width="2pt" + border-before-color="red" border-after-color="blue"> +In this example, padding and border properties are specified using writing-mode relative properties: +padding-before, padding-after, padding-start, and padding-end, etc. +According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified. +</fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="start" + start-indent="1cm"> + This block has a start-indent of 1cm and no borders or padding. It has +no margin-left set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="start" + margin-left="1cm"> + This block has a margin-left of 1cm and no borders or padding. It has +no start-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="start" + start-indent="1cm" + padding-left="4mm" border-left-width="1mm"> + This block has a start-indent of 1cm, padding-left of 4mm and border-left-width of 1mm. It has +no margin-left set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="start" + margin-left="5mm" + padding-left="4mm" border-left-width="1mm"> + This block has a margin-left of 5mm, padding-left of 4mm and border-left-width of 1mm. (Margin is outside the border rectangle.) It has +no start-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + + <!-- defines text title level 1--> + <fo:block font-size="14pt" + font-family="serif" + font-weight="bold" + line-height="16pt" + space-after="6pt" + text-align="center" + break-before="page"> + End-indent tests + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + end-indent="1cm"> + This block has an end-indent of 1cm and no borders or padding. It has +no margin-right set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + margin-right="1cm"> + This block has a margin-right of 1cm and no borders or padding. It has +no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + end-indent="1cm" + padding-end="4mm" border-end-width="1mm"> + This block has an end-indent of 1cm, padding-end of 4mm and border-end-width of 1mm. It has +no margin-right set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + margin-right="5mm" + padding-right="4mm" border-right-width="1mm"> + This block has a margin-right of 5mm, padding-right of 4mm and +border-right-width of 1mm. (Margin is outside the border rectangle.) It has +no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + margin-right="5mm" + padding-end="4mm" border-end-width="1mm"> + This block has a margin-right of 5mm, padding-end of 4mm and +border-end-width of 1mm. (Margin is outside the border rectangle.) It has +no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/extensive.fo b/examples/fo/basic/extensive.fo new file mode 100644 index 000000000..a1cc5c46a --- /dev/null +++ b/examples/fo/basic/extensive.fo @@ -0,0 +1,148 @@ +<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="50pt" margin-bottom="50pt" margin-left="100pt" margin-right="100pt"/> +</fo:simple-page-master> +</fo:layout-master-set> +<fo:page-sequence master-reference="one"> +<fo:flow flow-name="xsl-region-body"> +<fo:block>A Block</fo:block> +<fo:block text-align="end">An End Aligned Block</fo:block> +<fo:block text-align="center">A Centered Block</fo:block> +<fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks. Alignment is default.</fo:block> +<fo:block text-align="end">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. Alignment is end.</fo:block> +<fo:block text-align="center">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. Alignment is centered.</fo:block> +<fo:block text-align="justify">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. I'm going to keep going so I can get three lines to check how all but the last justify. There, that should do it. Alignment is justified.</fo:block> +<fo:block>A block for comparison</fo:block> +<fo:block space-before.optimum="12pt">A block with 12pt space-before</fo:block> +<fo:block>A block for comparison</fo:block> +<fo:block space-after.optimum="12pt">A block with 12pt space-after</fo:block> +<fo:block>A block for comparison</fo:block> +<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block with both 12pt space-before and space-after</fo:block> +<fo:block>A block for comparison</fo:block> +<fo:block start-indent="50pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. There is a start-indent of 50pt.</fo:block> +<fo:block end-indent="50pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. There is an end-indent of 50pt.</fo:block> +<fo:block start-indent="50pt" end-indent="50pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. There is a start-indent and end-indent of 50pt.</fo:block> +<fo:block font-size="15pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The font-size is set to 15pt.</fo:block> +<fo:block line-height="20pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The line-height is set to 20pt.</fo:block> +<fo:block font-size="15pt" line-height="20pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The font-size is set to 15pt and the line-height is set to 20pt.</fo:block> +<fo:block font-size="15pt" line-height="15pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The font-size is set to 15pt and the line-height is set to 15pt.</fo:block> +<fo:block space-before.optimum="12pt" space-after.optimum="12pt"><fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block within a block</fo:block></fo:block> +<fo:block space-before.optimum="12pt" space-after.optimum="12pt">Text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block within a block</fo:block>Text after</fo:block> +<fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="50pt">Text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block within a block with 50pt start-intent</fo:block>Text after</fo:block> +<fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="50pt">And again for the page break, text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block within a block with 50pt start-intent</fo:block>Text after</fo:block> +<fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="50pt">Text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block with 50pt start-indent within a block with 50pt start-intent</fo:block>Text after</fo:block> +<fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="50pt">Text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="100pt">A block with 100pt start-indent within a block with 50pt start-intent</fo:block>Text after</fo:block> +<fo:list-block provisional-distance-between-starts="12pt" space-before.optimum="12pt" text-align="justify"> +<fo:list-item> +<fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> +<fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body> +</fo:list-item> +<fo:list-item> +<fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> +<fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body> +</fo:list-item> +</fo:list-block> +<fo:list-block start-indent="50pt" provisional-distance-between-starts="12pt" space-before.optimum="12pt" text-align="justify"> +<fo:list-item> +<fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> +<fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The list-block has a start-indent of 50pt and a text-align of justified.</fo:block></fo:list-item-body> +</fo:list-item> +<fo:list-item> +<fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> +<fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a second multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a third multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body> +</fo:list-item> +</fo:list-block> +<fo:list-block provisional-distance-between-starts="12pt" space-before.optimum="12pt" text-align="justify"> +<fo:list-item> +<fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> +<fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block start-indent="100pt">This is a multiple line block with start-indent 100pt that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body> +</fo:list-item> +<fo:list-item> +<fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> +<fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.<fo:block>This is an embedded multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body> +</fo:list-item> +</fo:list-block> + <fo:list-block provisional-distance-between-starts="12pt" space-before.optimum="12pt"> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block>A block in a list-item-body</fo:block></fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:list-block provisional-distance-between-starts="12pt"> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block>This is a list item in a list that is itself a list item</fo:block></fo:list-item-body> + </fo:list-item> + </fo:list-block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + <fo:block break-before="page" font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">Next Stage</fo:block> + <fo:block>Right, now we are ready to try some newly implemented things like rules. What follows is a display rule of default thickness 1pt and a space-before and space-after of 12pt.</fo:block> + <fo:block><fo:leader leader-pattern="rule" space-before.optimum="12pt" space-after.optimum="12pt"/></fo:block> + <fo:block>Now what follows is a leader of thickness 5pt with start-indent of 100pt (same space-before/after as before).</fo:block> + <fo:block><fo:leader leader-pattern="rule" space-before.optimum="12pt" space-after.optimum="12pt" rule-thickness="5pt" start-indent="100pt"/></fo:block> + <fo:block font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt" + ><fo:inline color="#500">C</fo:inline + ><fo:inline color="#700">o</fo:inline + ><fo:inline color="#900">l</fo:inline + ><fo:inline color="#B00">o</fo:inline + ><fo:inline color="#D00">u</fo:inline + ><fo:inline color="#F00">r</fo:inline + ></fo:block> + <fo:block color="black">black</fo:block> + <fo:block color="green">green</fo:block> + <fo:block color="silver">silver</fo:block> + <fo:block color="lime">lime</fo:block> + <fo:block color="gray">gray</fo:block> + <fo:block color="olive">olive</fo:block> + <fo:block color="white">white</fo:block> + <fo:block color="yellow">yellow</fo:block> + <fo:block color="maroon">maroon</fo:block> + <fo:block color="navy">navy</fo:block> + <fo:block color="red">red</fo:block> + <fo:block color="blue">blue</fo:block> + <fo:block color="purple">purple</fo:block> + <fo:block color="teal">teal</fo:block> + <fo:block color="fuchsia">fuchsia</fo:block> + <fo:block color="aqua">aqua</fo:block> + <fo:block break-before="even-page" font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">Wrap</fo:block> + <fo:block space-before.optimum="12pt">This is a rather long sentence that is going to keep on going and going, not really to demonstrate anything other that normal wrapping because the following paragraph will show what happens when wrap-option is set to no-wrap.</fo:block> + <fo:block space-before.optimum="12pt" wrap-option="no-wrap">This is a rather long sentence that is going to keep on going and going to demonstrate what happens when wrap-option is set to no-wrap which is unlike the preceding sentence where it defaults to wrap.</fo:block> + <fo:block space-before.optimum="12pt" wrap-option="wrap">This is a rather long sentence that is going to keep on going and going, not really to demonstrate anything other that normal wrapping but it differs from the first of these three sentences in that wrap is set explicitly.</fo:block> + <fo:block font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">White Space Collapse</fo:block> +<fo:block>This is default!</fo:block> +<fo:block white-space-collapse="false">This is false!</fo:block> +<fo:block white-space-collapse="true">This is true!</fo:block> +<fo:block font-family="monospace" + white-space-collapse="false" + linefeed-treatment="preserve" + white-space-treatment="preserve" + wrap-option="no-wrap"> +<![CDATA[<?xml version="1.0"?> +<document> + <heading>This is a heading</heading> + <list> + <item>Item one</item> + <item>Item two</item> + </list> +</document>]]> +</fo:block> + <fo:block break-before="page" font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">Embedded SVG</fo:block> + <fo:block><fo:instream-foreign-object> + <svg:svg width="400pt" height="200pt"> + <svg:rect style="fill:none;stroke:blue" x="20pt" y="20pt" width="100pt" height="100pt"/> + <svg:line x1="20pt" y1="20pt" x2="120pt" y2="120pt"/> + <svg:line x1="120pt" y1="20pt" x2="20pt" y2="120pt"/> + <svg:text x="20pt" y="150pt">Hello SVG!</svg:text> + </svg:svg> + </fo:instream-foreign-object></fo:block> + <fo:block>The above is an example of an SVG graphic</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> + + diff --git a/examples/fo/basic/fonts.fo b/examples/fo/basic/fonts.fo new file mode 100644 index 000000000..7501104a2 --- /dev/null +++ b/examples/fo/basic/fonts.fo @@ -0,0 +1,195 @@ +<?xml version="1.0" ?> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <!-- defines the layout master --> + <fo:layout-master-set> + <fo:simple-page-master master-name="first" + 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:layout-master-set> + + <!-- starts actual layout --> + <fo:page-sequence master-reference="first"> + + +<fo:flow flow-name="xsl-region-body"> + + <fo:block font-family="Helvetica" font-size="14pt"> +Helvetica + </fo:block> + <fo:block space-after.optimum="10pt" font-family="Helvetica"> +! " # $ % & ' ( ) * ++ , - . / 0 1 2 3 4 +5 6 7 8 9 : ; < = > +? @ A B C D E F G H +I J K L M N O P Q R +S T U V W X Y Z [ \ +] ^ _ ` a b c d e f +g h i j k l m n o p +q r s t u v w x y z +{ | } ~ ¡ ¢ £ ¤ ¥ ¦ +§ ¨ © ª « ¬ ® ¯ ° ± +² ³ ´ µ ¶ · ¸ ¹ º » +¼ ½ ¾ ¿ À Á Â Ã Ä Å +Æ Ç È É Ê Ë Ì Í Î Ï +Ð Ñ Ò Ó Ô Õ Ö × Ø Ù +Ú Û Ü Ý Þ ß à á â ã +ä å æ ç è é ê ë ì í +î ï ð ñ ò ó ô õ ö ÷ +ø ù ú û ü ý þ ÿ +Œ œ Š š Ÿ +Ž ž ƒ ˜ – — ‘ +’ ‚ “ ” „ † ‡ +• … ‰ ‹ › ™ + </fo:block> + + <fo:block font-family="Helvetica" font-size="14pt"> +Times Roman + </fo:block> + <fo:block space-after.optimum="10pt" font-family="Times Roman"> +! " # $ % & ' ( ) * ++ , - . / 0 1 2 3 4 +5 6 7 8 9 : ; < = > +? @ A B C D E F G H +I J K L M N O P Q R +S T U V W X Y Z [ \ +] ^ _ ` a b c d e f +g h i j k l m n o p +q r s t u v w x y z +{ | } ~ ¡ ¢ £ ¤ ¥ ¦ +§ ¨ © ª « ¬ ® ¯ ° ± +² ³ ´ µ ¶ · ¸ ¹ º » +¼ ½ ¾ ¿ À Á Â Ã Ä Å +Æ Ç È É Ê Ë Ì Í Î Ï +Ð Ñ Ò Ó Ô Õ Ö × Ø Ù +Ú Û Ü Ý Þ ß à á â ã +ä å æ ç è é ê ë ì í +î ï ð ñ ò ó ô õ ö ÷ +ø ù ú û ü ý þ ÿ Œ +œ Š š Ÿ Ž ž ƒ +˜ – — ‘ ’ ‚ +“ ” „ † ‡ • … +‰ ‹ › ™ + </fo:block> + + <fo:block font-family="Helvetica" font-size="14pt"> +Courier + </fo:block> + <fo:block space-after.optimum="10pt" font-family="Courier"> +! " # $ % & ' ( ) * ++ , - . / 0 1 2 3 4 +5 6 7 8 9 : ; < = > +? @ A B C D E F G H +I J K L M N O P Q R +S T U V W X Y Z [ \ +] ^ _ ` a b c d e f +g h i j k l m n o p +q r s t u v w x y z +{ | } ~ ¡ ¢ £ ¤ ¥ ¦ +§ ¨ © ª « ¬ ® ¯ ° ± +² ³ ´ µ ¶ · ¸ ¹ º » +¼ ½ ¾ ¿ À Á Â Ã Ä Å +Æ Ç È É Ê Ë Ì Í Î Ï +Ð Ñ Ò Ó Ô Õ Ö × Ø Ù +Ú Û Ü Ý Þ ß à á â ã +ä å æ ç è é ê ë ì í +î ï ð ñ ò ó ô õ ö ÷ +ø ù ú û ü ý þ ÿ Œ +œ Š š Ÿ Ž +ž ƒ ˜ – — ‘ +’ ‚ “ ” „ † ‡ +• … ‰ ‹ › ™ + </fo:block> + + <fo:block font-family="Helvetica" font-size="14pt"> + ZapfDingbats: + </fo:block> + <fo:block space-after.optimum="10pt" font-family="ZapfDingbats"> +✁ ✂ ✃ ✄ ☎ ✆ ✇ +✈ ✉ ☛ ☞ ✌ ✍ ✎ +✏ ✐ ✑ ✒ ✓ ✔ ✕ +✖ ✗ ✘ ✙ ✚ ✛ ✜ +✝ ✞ ✟ ✠ ✡ ✢ ✣ +✤ ✥ ✦ ✧ ★ ✩ ✪ +✫ ✬ ✭ ✮ ✯ ✰ ✱ +✲ ✳ ✴ ✵ ✶ ✷ ✸ +✹ ✺ ✻ ✼ ✽ ✾ ✿ +❀ ❁ ❂ ❃ ❄ ❅ ❆ +❇ ❈ ❉ ❊ ❋ ● ❍ +■ ❏ ❐ ❑ ❒ ▲ ▼ +◆ ❖ ◗ ❘ ❙ ❚ ❛ +❜ ❝ ❞ ❡ ❢ ❣ ❤ +❥ ❦ ❧ ♣ ♦ ♥ ♠ +① ② ③ ④ ⑤ ⑥ ⑦ +⑧ ⑨ ⑩ ❶ ❷ ❸ ❹ +❺ ❻ ❼ ❽ ❾ ❿ ➀ +➁ ➂ ➃ ➄ ➅ ➆ ➇ +➈ ➉ ➊ ➋ ➌ ➍ ➎ +➏ ➐ ➑ ➒ ➓ ➔ → +↔ ↕ ➘ ➙ ➚ ➛ ➜ +➝ ➞ ➟ ➠ ➡ ➢ ➣ +➤ ➥ ➦ ➧ ➨ ➩ ➪ +➫ ➬ ➭ ➮ ➯ ➱ ➲ +➳ ➴ ➵ ➶ ➷ ➸ ➹ +➺ ➻ ➼ ➽ ➾   +       +     + </fo:block> + + <fo:block font-family="Helvetica" font-size="14pt"> + Symbol: + </fo:block> + <fo:block space-after.optimum="10pt" font-family="Symbol"> +! # % & ( ) + , . / +0 1 2 3 4 5 6 7 8 9 +: ; < = > ? [ ] _ m +{ | } ¬ ° ± µ × ÷ +ƒ Α Β Γ Ε Ζ Η +Θ Ι Κ Λ Μ Ν Ξ +Ο Π Ρ Σ Τ Υ Φ +Χ Ψ α β γ δ ε +ζ η θ ι κ λ ν +ξ ο π ρ ς σ τ +υ φ χ ψ ω ϑ ϒ +ϕ ϖ • … ′ ″ ⁄ +ℑ ℘ ℜ Ω ℵ ← ↑ +→ ↓ ↔ ↵ ⇐ ⇑ ⇒ +⇓ ⇔ ∀ ∂ ∃ ∅ ∆ +∇ ∈ ∉ ∋ ∏ ∑ − +∗ √ ∝ ∞ ∠ ∧ ∨ +∩ ∪ ∫ ∴ ∼ ≅ ≈ +≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ +⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ⌠ +⌡ 〈 〉 ◊ ♠ ♣ ♥ +♦       +       +       +       +  + </fo:block> + + <fo:block font-family="Helvetica" font-size="12pt"> + Some special characters: + </fo:block> + <fo:block space-after.optimum="10pt" font-family="Helvetica"> +Euro ( dec 8364, hex 20AC): € + </fo:block> + + + <fo:block space-after.optimum="10pt" font-family="Helvetica"> + + </fo:block> + +</fo:flow> +</fo:page-sequence> +</fo:root> + diff --git a/examples/fo/basic/hyphen.fo b/examples/fo/basic/hyphen.fo new file mode 100644 index 000000000..bd5d426ee --- /dev/null +++ b/examples/fo/basic/hyphen.fo @@ -0,0 +1,428 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- example for a simple fo file. At the beginning the page layout is set. + Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions +--> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + In this case there is only a simple-page-master which defines the + layout for all pages of the text + --> + <!-- layout information --> + <fo:simple-page-master master-name="simple" + page-height="29.7cm" + page-width="21cm" + margin-top="1cm" + margin-bottom="2cm" + margin-left="7cm" + margin-right="3cm"> + <fo:region-body margin-top="3cm"/> + <fo:region-before extent="3cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + </fo:layout-master-set> + <!-- end: defines page layout --> + + + <!-- start page-sequence + here comes the text (contained in flow objects) + the page-sequence can contain different fo:flows + the attribute value of master-name refers to the page layout + which is to be used to layout the text contained in this + page-sequence--> + <fo:page-sequence master-reference="simple"> + + <!-- start fo:flow + each flow is targeted + at one (and only one) of the following: + xsl-region-body (usually: normal text) + xsl-region-before (usually: header) + xsl-region-after (usually: footer) + xsl-region-start (usually: left margin) + xsl-region-end (usually: right margin) + ['usually' applies here to languages with left-right and top-down + writing direction like English] + in this case there is only one target: xsl-region-body + --> + <fo:flow flow-name="xsl-region-body" + text-align="justify"> + + <!-- each paragraph is encapsulated in a block element + the attributes of the block define + font-family and size, line-heigth etc. --> + + <!-- this defines a title --> + <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="3pt"> + Hyphenation tests + </fo:block> + + <!-- this defines a title --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="12pt" + background-color="blue" + color="white" + text-align="start"> + US English + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="justify" + language="en" + country="US" + hyphenate="true" + hyphenation-push-character-count="2" + hyphenation-remain-character-count="2" > + 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. + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="justify" + language="en" + country="US" + hyphenate="true" + hyphenation-push-character-count="2" + hyphenation-remain-character-count="2" > + 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 the w3c website. A list of current W3C + Recommendations and other technical documents can be found there too. + </fo:block> + + + <!-- this defines a title --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="12pt" + background-color="blue" + color="white" + text-align="start"> + German + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + language="de" + hyphenate="true" + hyphenation-push-character-count="2" + hyphenation-remain-character-count="2" > + 1. Warum TEI? + Die Verwendungszeit elektronischer Editionen wird von mehreren + Faktoren verkürzt: der kurzen Lebensdauer der Programme, die zu + ihrer Darstellung verwendet werden, der etwas längeren der + Betriebssysteme, unter denen die Darstellungsprogramme laufen, + der logischen Einrichtung des Datenträgers, auf dem sich die + Edition befindet, und dessen physischer Dauer. Um die besonders + unangenehme Abhängigkeit elektronischer Texte von bestimmten + Programmen und Betriebssystemen zu vermeiden, haben + Wissenschaftler ein Textauszeichnungssystem für philologische + Belange entwickelt, das nach dem Entwicklerteam "Text Encoding + Initiative" (TEI) genannt wird (1). + </fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + language="de" + hyphenate="true"> + Das Auszeichnungssystem TEI ist eine Anwendung der Metasprache + zur Beschreibung programmunabhängiger Auszeichnungssysteme SGML + (Standard Generalized Markup Language), so wie auch HTML, mit + dem die meisten Texte des Internets zur Zeit ausgezeichnet + sind, eine Anwendung von SGML ist. Daten, die entsprechend den + TEI-Richtlinien ausgezeichnet worden sind, können also mit + jedem Programm, das SGML-Daten verarbeiten kann, dargestellt, + umgewandelt oder durchsucht werden. (2) + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + language="de" + hyphenate="true"> + + Verwendet wurde für die Auszeichnung 'teilite', das eine + Teilmenge des gesamten Auszeichnungssystems TEI bietet, aber + auf einige der komplexeren Merkmale verzichtet und deshalb auch + eine einfache Konvertierung der Daten zu neueren Metasprachen + für Auszeichnungssysteme wie XML, einer Teilmenge von SGML, + ermöglicht. + SGML-Programme mit der Leistungsfähigkeit von Folio Views sind + z.Zt. noch relativ teuer, daher wurde für die vorliegende + Edition der Weg gewählt, den Text doppelt auf die CD zu legen: + Einmal für die sofortige Nutzung mit einer komfortablen + Oberfläche und einmal ohne Software in einem Format, das seine + langfristige Verwendbarkeit garantiert. + Das Nachstehende soll einige Hinweise zur Einrichtung der TEI- + Dateien geben, um deren weitere Verwendung zu erleichtern. + </fo:block> + + + + <!-- Finnish example sent in by Jarno Elovirta --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="12pt" + background-color="blue" + color="white" + text-align="start"> + Finnish + </fo:block> + + <fo:block language="fi" + hyphenate="true"> + <fo:block font-weight="bold">Internet - tuo kaiken pahan lähde?</fo:block> + <fo:block>Internet on saanut nauttia lähes täydellisestä sananvapaudesta koko + olemassaolonsa ajan. Parin viimeiksi kuluneen vuoden aikana on kuitenkin + julkisuudessa keskusteltu ahkerasti sen rajoittamisesta. Muutamat ilmaista + kotisivutilaa tarjoavat palvelut ovatkin jo kieltäneet esimerkiksi natsimia + kannattavien sivujen ylläpidon.</fo:block> <fo:block>Astetta pahempaan + suuntaan ollaan kuitenkin menossa. Nettihuutokaupoissa tarjotaan kaikkea + ihmiselimistä lähtien ja itsemurhiin etsitään avustajia itsemurhia suosivilta + nettisivustoilta. Etelä-Koreassa poliisi on pidättänyt 20-vuotiaan miehen, + jota epäillään ns. netti-itsemurhassa avustamisesta. Mies oli luvannut noin + 4000 dollarin korvausta vastaan kuristaa 23-vuotiaan naisen kuoliaaksi. Nainen + tuli kuitenkin viime hetkellä toisiin ajatuksiin. Mies väittää kyseessä olleen + pelkän vitsin. Viime kuussa Etelä-Koreassa kaksi opiskelijaa myrkytti itsensä + netistä löytämiensä ohjeiden avulla.</fo:block> <fo:block>FBI puolestaan + tutkii tapausta, jossa äiti oli myynyt kaksostytöt adoptoitavaksi korkeinta + tarjousta vastaan nettihuutokaupalla. Tytöt myytiin ensin Kaliforniaan Allenin + pariskunnalle, josta äiti kuitenkin kävi ryöstämässä lapset, sillä + englantilainen Kilshawin pariskunta oli tarjonnut tytöistä tuplasumman. + Kilshawit kuljettivat lapset Englantiin ja nyt tyttöjen perässä ovat sekä + kahdet adoptiovanhemmat että iso liuta eri viranomaistahoja. Myös + Iso-Britannian pääministeri Tony Blair on pitänyt lehdistötilaisuuden + aiheeseen liittyen. Lue juttu.</fo:block> <fo:block>K2, 23:10. Lähde: + Newsbytes | 5 kommenttia</fo:block> <fo:block font-weight="bold">Mato ryömii + Linux-palvelimiin</fo:block> <fo:block>Internetissä leviää Ramen nimellä + tunnettu mato, joka ilmeisesti hyödyntää kahta tunnettua tietoturva-aukkoa Red + Hat Linuxin 6.2 ja 7.0 versioissa esiintyvissä wu-ftpd ja RPC.statd + -ohjelmissa. Jos mato pääsee sisään järjestelmään, se korvaa palvelimella + sijaitsevan HTML-pääsivun tekstillä, jossa kerrotaan hakkereiden pitävän + nuudeleista. Madon on todettu leviävän erittäin nopeasti, sillä jos kaistaa + riittää se pystyy skannaamaan jopa kaksi B-luokan verkkoa 15 minuutissa. Madon + ei ole todettu avaavan palvelimiin takaovia, joiden kautta madon kirjoittaja + pääsisi sisään järjestelmään. Lue juttu</fo:block> <fo:block>oma, 20:48. + Lähde: ZDNet | 6 kommenttia</fo:block> <fo:block font-weight="bold">Macromedia + ja Allaire yhdistyvät</fo:block> <fo:block>Macromedian ja Allairen + julkaisemissa lehdistötiedotteissa kerrotaan yhtiöiden + yhdistymissuunnitelmista. Macromedialle yrityskauppa maksaa noin 2,2 miljardia + markkaa. Uuden yhdistyneen yrityksen nimenä säilyy Macromedia ja sen johdossa + jatkaa Macromedian nykyinen toimitusjohtaja Rob Burgess. Yrityksen tuotteisiin + lukeutuvat mm. Macromedia Dreamweaver, Macromedia Flash, Allaire ColdFusion ja + Allaire JRun. Lue juttu.</fo:block> + </fo:block> + + <!-- Italian example sent in by Stéphane Bline--> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="12pt" + background-color="blue" + color="white" + text-align="start"> + Italian + </fo:block> + + <fo:block language="it" + hyphenate="true"> + <fo:block + space-before.optimum="0.6em" space-before.minimum="0.4em" + space-before.maximum="0.8em">Un'applicazione di servizio consiste nell'utilizzo + di applicazioni nell'ambito aziendale, senza procedere ad installazioni locali. + L'applicazione ha la particolarità di essere ospitata "in-house" tramite + Intranet o presso un fornitore esterno di applicazioni di servizi (ASP, acronimo + di Application Service Provider) e di transitare grazie al protocollo di + Internet. Intermediario eventuale tra l'editore di software e il cliente che + desidera utilizzarli, il provider permette agli utenti di accedere ai vari + programmi, previo contratto d'abbonamento.</fo:block> <fo:block + space-before.optimum="0.6em" space-before.minimum="0.4em" + space-before.maximum="0.8em">L'utilizzazione in linea rende automatica la + manutenzione e l'aggiornamento delle applicazioni. A partire da una semplice + interfaccia Web installata su un thin client, l'utente può accedere via + Internet o Intranet all'insieme delle applicazioni attraverso il proprio account + personale e dedicarsi all'utilizzazione approfondita delle applicazioni + professionali.</fo:block> <fo:block font-weight="bold" + space-after.optimum="6pt">Esempio 1.1. Esempio di applicazione di + servizio</fo:block> <fo:block space-before.optimum="0.6em" + space-before.minimum="0.4em" space-before.maximum="0.8em">Si prenda il caso di + una società A che desidera ottimizzare la comunicazione interna e la + condivisione delle informazioni. Un fornitore di applicazioni di servizio + potrà rispondere rapidamente a questa aspettativa. Inoltre, potrà proporre + servizi complementari che permettono di proteggere i dati di A. Dopo aver + studiato l'offerta, un responsabile della società firma con il fornitore B un + contratto d'abbonamento a un'applicazione di servizio perfettamente adattata. Le + società e B scambiano informazioni relative all'utilizzo online di questa + applicazione, come il costo del servizio, le modalità di pagamento e la gestione + degli account utente come i profili.</fo:block> </fo:block> + + + <!-- this defines a title --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="12pt" + background-color="blue" + color="white" + text-align="start"> + Danish + </fo:block> + <fo:block language="da" + hyphenate="true"> + Bekendtgørelsen har som udkast været + notificeret i overensstemmelse med Europa-parlamentets og RÃ¥dets direktiv + 98/34/EF (Informationsproceduredirektivet), som senest ændret ved direktiv + 98/48/EF. Bekendtgørelsen indeholder bestemmelser der gennemfører dele af + RÃ¥dets direktiv 89/677/EØF (EF-tidende L 398 s. 19). + </fo:block> + + <fo:block language="da" + hyphenate="true"> + Bekendtgørelsens regler hindrer + ikke import, salg og anvendelse af produkter, der pÃ¥ tidspunktet for + bekendtgørelsens ikrafttræden er reguleret i medfør af anden lovgivning, + der implementerer EU-direktiver, samt anden lovgivning i øvrigt, herunder + bl.a. bekendtgørelse nr. 807 af 2. december 1986 om + begrænsning af motorbenzins indhold af blyforbindelser og benzen. + </fo:block> + <fo:block language="da" + hyphenate="true"> + Import og salg af produkter, der + indeholder kemiske forbindelser af bly, er forbudt fra 1. marts 2001. + Uanset forbudet i stk. + 1 er import og salg af produkter, der indeholder kemiske forbindelser af + bly, fortsat tilladt for de produktkategorier, som er nævnt i bilag + 1 til denne bekendtgørelse, indtil de i bilaget anførte + tidspunkter. + </fo:block> + + + <!-- this defines a title --> + <fo:block font-size="12pt" + font-family="Palatino" + line-height="12pt" + background-color="blue" + color="white" + text-align="start"> + Norwegian + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + language="no" + hyphenate="true"> + + <fo:block> +Av forstÃ¥elige grunner har Ã¥ret 1814 vært av de mest omdiskuterte i norsk historieforskning. +Med denne bibliografien vil man for første gang fÃ¥ en samlet oversikt over den viktigste +historiske litteraturen omkring dette Ã¥ret og dets mangslungne begivenheter. Likevel har det +vært en tilnærmet umulig oppgave Ã¥ fÃ¥ med absolutt alt som er skrevet om Riksforsamlingen og +Grunnloven i monografier, erindringsverker, bygdebøker, brevsamlinger, tidsskrifter og +aviser helt fra 1814 og til i dag. Bibliografien er et forsøk pÃ¥ Ã¥ samle de viktigste +arbeider om 1814 som kan være av interesse bÃ¥de for forskere og for et bredt +historieinteressert publikum. I denne korte historiografien vil det bli gjort rede for +hvordan dette spennende Ã¥ret er blitt forstÃ¥tt og fortolket av norske og nordiske +historikere gjennom fem ulike tidsepoker. + </fo:block> + <fo:block> +Litteraturen om 1814 kan klassifiseres pÃ¥ flere mÃ¥ter. Grovt sett gÃ¥r det et skille mellom +tre genrer: historiske oversiktsverker, historiske spesialstudier, erindringer og dagbøker +og kilde- og dokumentutgivelser. Av oversiktsverker peker de store Norgeshistoriene seg ut +med sin relativt omfattende behandling av 1814: Nevnes kan +<fo:inline font-style="italic">Norges historie fremstillet for +det norske folk</fo:inline>, bd. VI.1 (1913), +<fo:inline font-style="italic">Det norske folks liv og historie</fo:inline> bd. VII (1933), +<fo:inline font-style="italic">VÃ¥rt folks historie</fo:inline> bd. 6 (1964), +<fo:inline font-style="italic">Cappelens Norges historie</fo:inline> bd. 9 (1978) og +<fo:inline font-style="italic">Aschehougs Norgeshistorie</fo:inline> bd. 7 (1996). Disse oversiktene er i vesentlig grad bygd pÃ¥ den omfattende +spesiallitteraturen i bok- eller artikkelform som har et meget vidt spenn, fra biografier +over lokale Eidsvollsmenn til krigshistoriske analyser av felttoget. Mye tidligere skjult +kunnskap er dessuten blitt hentet ut fra dagbøkene til sentrale aktører. Endelig har den +lange rekken av kildeutgivelser hatt stor betydning for forskningen omkring 1814 og bidratt +til Ã¥ endre forskningsbildet flere ganger. + </fo:block> + <fo:block font-weight="bold"> +1814-1864 + </fo:block> + <fo:block> +Det norske samfunnet etter 1814 ble rekonstruert pÃ¥ den nye Grunnlovens grunn, og vernet om +den stod sentralt i den politiske kampen de neste 25 Ã¥rene. Til tross for dette mÃ¥ man kunne +si at dokumentasjonen av hva som egentlig hadde skjedd i 1814 i mange Ã¥r forble temmelig +beskjeden. Historiene levde, men da helst muntlig eller gjennom private brev og dagbøker. +Dette var kanskje en uunngÃ¥elig konsekvens av omstendighetene. Landet var fattig pÃ¥ kultur, +forleggere og historikere, og de politiske og økonomiske realiteter kalte mer pÃ¥ praktisk +fornuft enn pÃ¥ idealistisk pasjon. Det forekom Ã¥ være en lang vei fra den nasjonale raptus +under de lyse vÃ¥rukene pÃ¥ et grønnende Eidsvoll til den mer prosaiske og realpolitiske +aksept av union og svenskekonge i et høstlig og tÃ¥ketungt Christiania. Det var den nye +Grunnloven av 4. november 1814 som gjaldt og regulerte det norske samfunnet, supplert av +Riksakten av 1815. + </fo:block> + <fo:block> +Riksforsamlingens forhandlinger i 1814 ble utgitt i 6 hefter allerede samme Ã¥r av de valgte +redaktører, professor Georg Sverdrup, professor Ludvig Stoud Platou og tollprokurør +Christopher Omsen. At de ikke ble reprodusert i de følgende Ã¥r, hadde sammenheng med den +svenske holdningen. Forhandlingene pÃ¥ det ekstraordinære Storting ble utgitt bÃ¥de i 1815 og +igjen i 1835, men Carl Johan oppfattet lenge interessen for Riksforsamlingen og 17. mai- +Grunnloven som en indirekte underkjenning av unionsverket og kongens politiske autoritet. +Etter pÃ¥trykk fra ham prøvde norske myndigheter Ã¥ sette en stopper for offentlig feiring av +17. mai helt frem til midten av 1830-Ã¥rene. + </fo:block> + <fo:block> +Rimeligvis ble da forholdet til Danmark snarere enn forholdet til Sverige ett av de første +alvorlige stridsspørsmÃ¥l i perioden. Presten og Eidsvollsmannen Nicolai Wergeland ble +beryktet for den danskfiendtlige og unionsvennlige posisjon han inntok i boken +<fo:inline font-style="italic">En sandfærdig Beretning om Danmarks politiske Forbrydelser imod Kongeriget Norge +</fo:inline> (anonymt, 1816) som +fulgte nasjonalhistorien helt opp til Kielfreden. Skriftet vakte debatt og kraftige +reaksjoner ikke minst blant det gamle selvstendighetsparti. Blant annet publiserte Christian +Magnus Falsen to motskrifter i 1817. Falsen prøvde ogsÃ¥ Ã¥ popularisere Grunnlovens innhold +for den mindre "oplyste" borgerklasse og allmue gjennom skriftet +<fo:inline font-style="italic">Norges Grundlov gjennemgaaet i Spørgs-maal og Svar +</fo:inline> (1818, forkortet versjon 1825). Men det mÃ¥ kunne pÃ¥stÃ¥s +at den mer detaljerte historien om grunnlovsverkets tilblivelse og første fase lenge ble +stÃ¥ende i noe av et halvmørke bÃ¥de for det alminnelige folk og for de nye generasjoner, og +at dette skyldtes den politiske situasjonen. Det var Nicolai Wergeland som leverte selve +pionerarbeidet blant de personlige kildesamlingene, +<fo:inline font-style="italic">Fortrolige Breve til en Ven, Skrevne fra +Eidsvold i Aaret 1814</fo:inline> (anonymt, 1830). Men det var først da det unionspolitiske klimaet +mildnet etter 1837 at det ble Ã¥pnet for en grundigere historisk analyse av Grunnlovens +forhistorie og tilblivelse. + </fo:block> + </fo:block> + </fo:flow> <!-- closes the flow element--> + </fo:page-sequence> <!-- closes the page-sequence --> +</fo:root> diff --git a/examples/fo/basic/images.fo b/examples/fo/basic/images.fo new file mode 100644 index 000000000..1f5ec278a --- /dev/null +++ b/examples/fo/basic/images.fo @@ -0,0 +1,83 @@ +<?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 master-name="right" + margin-top="75pt" margin-bottom="25pt" margin-left="100pt" margin-right="50pt"> + <fo:region-body margin-bottom="50pt"/> + <fo:region-after extent="25pt"/> +</fo:simple-page-master> + +<fo:simple-page-master master-name="left" + margin-top="75pt" margin-bottom="25pt" margin-left="50pt" margin-right="100pt"> + <fo:region-body margin-bottom="50pt"/> + <fo:region-after extent="25pt"/> +</fo:simple-page-master> + +<fo:page-sequence-master master-name="psmOddEven" > + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="right" + page-position="first" /> + <fo:conditional-page-master-reference master-reference="left" + odd-or-even="even" /> + <fo:conditional-page-master-reference master-reference="right" + odd-or-even="odd" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + +</fo:layout-master-set> + +<fo:page-sequence id="N2528" master-reference="psmOddEven"> + +<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 id="N2531"> + <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> + <fo:block> + <fo:external-graphic src="file:../graphics/xml_feather.gif"/> + </fo:block> +</fo:block> +<fo:block id="N2535"> + <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> + <fo:block> + <fo:external-graphic src="file:../graphics/xml_feather_transparent.gif"/> + </fo:block> +</fo:block> +<fo:block id="N2545"> + <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> + <fo:block> + <fo:external-graphic src="file:../graphics/fop.jpg"/> + </fo:block> +</fo:block> +<fo:block id="N2550"> + <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> + <fo:block> + <fo:external-graphic src="file:../graphics/linux.bmp"/> + </fo:block> +</fo:block> +<fo:block id="N2559"> + <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:page-sequence id="N2561" master-reference="psmOddEven"> +<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">A. Appendix</fo:block></fo:flow> +</fo:page-sequence> +</fo:root> + diff --git a/examples/fo/basic/inhprop.fo b/examples/fo/basic/inhprop.fo new file mode 100644 index 000000000..766c3b694 --- /dev/null +++ b/examples/fo/basic/inhprop.fo @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<!-- example for a simple fo file. At the beginning the page layout is set. +Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations, +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + - page-sequence-masters: have the role of describing the sequence + of page-masters that will be used to generate + pages during the formatting of an fo:page-sequence + + --> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + page-height="29.7cm" + page-width="21cm" + margin-top="1cm" + margin-bottom="2cm" + margin-left="2.0cm + 0.5cm" + margin-right="(5cm * 1cm) div 2cm"> + <fo:region-body margin-top="3cm"/> + <fo:region-before extent="3cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + page-height="abs(-30cm + .3cm)" + page-width="(10cm * 2) + 1cm" + margin-top="round(.5) * 1cm" + margin-bottom="round(2.4) * 1cm" + margin-left="2.5 * 1cm" + margin-right="5.5cm - 3cm"> + <fo:region-body margin-top="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <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" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="basicPSM"> + + <!-- header --> + <fo:static-content flow-name="xsl-region-before"> + <fo:block text-align="end" + font-size="10pt" + font-family="serif" + line-height="1em + 4pt" > + Property Function Tests - 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="min(18pt,20pt)" + font-family="sans-serif" + line-height="max(24pt,18pt)" + space-after.optimum="5 mod 3 * 7.5pt" + background-color="rgb(0,0,255)" + color="rgb(255,255,255)" + text-align="center" + padding-top="3pt"> + Property Function Tests + </fo:block> + + <!-- defines text title level 2--> + <fo:block font-size="floor(16.3) * 1pt" + font-family="sans-serif" + line-height="2pt * ceiling(9.3)" + space-before.optimum="10pt" + space-after.optimum="10pt" + text-align="start" + keep-with-next.within-page="always" + keep-together.within-page="always" + padding-top="3pt"> + Function: object from-parent( <fo:inline font-weight='bold'>NCName</fo:inline>) + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="3pt" + keep-together="auto" + text-align="start"> +The from-parent function returns a computed value of the property +whose name matches the argument specified. The value returned is that +for the parent of the formatting object for which the expression is +evaluated. If there is no parent, the value returned is the initial +value. If the argument specifies a shorthand property and if the +expression only consists of the from-parent function with an argument +matching the property being computed, it is interpreted as an +expansion of the shorthand with each property into which the shorthand +expands, each having a value of from-parent with an argument matching +the property. It is an error if arguments matching a shorthand +property are used in any other way. + <fo:block font-size="from-parent(font-size) - 2pt" + font-family="sans-serif" + space-before="from-parent(space-after)" + text-align="center"> + Here is a nested block with font-size = +from-parent(font-size) - 2pt. +Since its parent has font-size=12pt, that should mean 10pt. It should +keep the line height of 1.25em, which means 12.5pt leading. It's +space-before value is set to the space-after value from its +parent. Note that neither of these are inheritable. Does it look right? + </fo:block> + <fo:block font-size="from-parent(font-size) + 2pt" + space-before="2pt" + space-after="from-parent(space-after)" + font-family="sans-serif" + start-indent="from-parent(start-indent) + 1cm" + end-indent="from-parent(end-indent) + 1cm" + text-align="end" + background-color="black" color="rgb(50%,50%,50%)"> +Here is a nested block with text 2pt larger than its parent (that +should be 14pt). This parent is indented 1cm on both start and end +directions with respect to the values from its parent (which aren't +specified, so they default to 0.0). The color is set to 50% (using the +rgb function with % arguements, and the background color for this +block is black (specified as a keyword). In this block, we'll put an +<fo:inline color='inherited-property-value(background-color)' +background-color='inherited-property-value(color)'>inline object</fo:inline> +whose background and foreground colors invert those of its containing +block. This uses the <fo:inline +font-style='oblique'>inherited-property-value</fo:inline> +function. Here's an <fo:inline color='black' background-color='white'>inline +object</fo:inline> with fixed colors (black on white). That doesn't +work either. Guess it's not my problem... So let's try it with font +sizes. In this block, we'll put an +<fo:inline font-size='inherited-property-value(font-size)+2pt'>inline +object whose font-size is 2 pt bigger than its parent's font-size.</fo:inline></fo:block> + </fo:block> + <fo:block font-size="12pt" + space-before="6pt" + line-height="1em + 2pt" + font-family="sans-serif" + text-align="start" + background-color="rgb(50%,50%,50%)"> + An outer block with 12 pt text on 14 pt leading, default color +and 50% grey background color. Test inherited color changes with +nested blocks. + <fo:block color='from-parent(background-color)' + background-color='from-parent(color)'> + Interchange color and background color using from-parent function. + </fo:block> + </fo:block> + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/instream.fo b/examples/fo/basic/instream.fo new file mode 100644 index 000000000..20a740109 --- /dev/null +++ b/examples/fo/basic/instream.fo @@ -0,0 +1,114 @@ +<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>This is used to show how foreign objects are placed in a line area.</fo:block> + <fo:block> + Some block text to separate instream objects. + </fo:block> + <fo:block> + Some text before +<fo:instream-foreign-object> +<svg:svg width="20" height="20"> + <svg:g style="fill:red; stroke:#000000"> + <svg:rect x="0" y="0" width="15" height="15"/> + <svg:rect x="5" y="5" width="15" height="15"/> + </svg:g> +</svg:svg> +</fo:instream-foreign-object> + and some after the svg element. + </fo:block> + <fo:block> + A text line below the instream object. + </fo:block> + <fo:block> +<fo:instream-foreign-object> +<svg:svg width="250" height="50"> + <svg:g style="fill:red; stroke:#000000"> + <svg:rect x="0" y="0" width="15" height="15"/> + <svg:rect x="5" y="5" width="15" height="15"/> + </svg:g> + <svg:text style="font-family:Helvetica;fill:blue" x="10" y="30">SVG placed in a block</svg:text> +</svg:svg> +</fo:instream-foreign-object> + </fo:block> + <fo:block> + A text line below the block. + </fo:block> + <fo:block> + A text line with an instream foreign object that is before the line break. +<fo:instream-foreign-object> +<svg:svg width="50" height="50"> + <svg:g style="fill:red; stroke:#000000"> + <svg:rect x="0" y="0" width="15" height="15"/> + <svg:rect x="5" y="5" width="15" height="15"/> + </svg:g> + <svg:rect style="fill:none;stroke:black" x="0" y="0" width="49" height="49"/> +</svg:svg> +</fo:instream-foreign-object> +With some text on the next line. With a bit more text to go over the to the next line. + </fo:block> + <fo:block> + A text line with an instream foreign object that is after the line break. +With some text on the next line. With a bit +<fo:instream-foreign-object> +<svg:svg width="50" height="50"> + <svg:g style="fill:red; stroke:#000000"> + <svg:rect x="0" y="0" width="15" height="15"/> + <svg:rect x="5" y="5" width="15" height="15"/> + </svg:g> + <svg:rect style="fill:none;stroke:black" x="0" y="0" width="49" height="49"/> +</svg:svg> +</fo:instream-foreign-object> +more text to go over the to the next line. + </fo:block> + <fo:block> + A text line with an instream foreign object that is over the line break. +With some text +<fo:instream-foreign-object> +<svg:svg width="50" height="50"> + <svg:g style="fill:red; stroke:#000000"> + <svg:rect x="0" y="0" width="15" height="15"/> + <svg:rect x="5" y="5" width="15" height="15"/> + </svg:g> + <svg:rect style="fill:none;stroke:black" x="0" y="0" width="49" height="49"/> +</svg:svg> +</fo:instream-foreign-object> +on the next line. With a bit more text to go over the to the next line to +see it handles it properly. + </fo:block> + <fo:block> + The next block has an instream object wider than the area. + </fo:block> + <fo:block> +<fo:instream-foreign-object> +<svg:svg width="550" height="50"> + <svg:g style="fill:red; stroke:#000000"> + <svg:rect x="0" y="0" width="15" height="15"/> + <svg:rect x="5" y="5" width="15" height="15"/> + </svg:g> + <svg:rect style="fill:none;stroke:black" x="0" y="0" width="549" height="49"/> + <svg:text x="10" y="30">SVG placed in a really wide block</svg:text> +</svg:svg> +</fo:instream-foreign-object> + </fo:block> + <fo:block> + This block has an instream object wider than the area after this text +<fo:instream-foreign-object> +<svg:svg width="550" height="50"> + <svg:g style="fill:red; stroke:#000000"> + <svg:rect x="0" y="0" width="15" height="15"/> + <svg:rect x="5" y="5" width="15" height="15"/> + </svg:g> + <svg:rect style="fill:none;stroke:black" x="0" y="0" width="549" height="49"/> + <svg:text style="font-family:Helvetica" x="10" y="30">SVG placed in a really wide block</svg:text> +</svg:svg> +</fo:instream-foreign-object> + </fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/leader.fo b/examples/fo/basic/leader.fo new file mode 100644 index 000000000..cc378b31a --- /dev/null +++ b/examples/fo/basic/leader.fo @@ -0,0 +1,786 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- examples for the use of the fo leader --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + + <!-- page layout --> + <fo:simple-page-master master-name="first" + page-height="29.7cm" + page-width="21cm" + margin-top="2.5cm" + margin-bottom="2cm" + margin-left="2.5cm" + margin-right="2.5cm"> + <fo:region-body/> + </fo:simple-page-master> + + + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="first"> + + + <fo:flow flow-name="xsl-region-body"> + + <!-- Normal text --> + <fo:block font-size="16pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="start" + background-color="blue" + color="white" + > + Leader examples + </fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + fo:leader is mainly used a) in table-of-contents to generate sequences of "." glyphs that separate titles from page numbers + b) to create entry fields in fill-in-the-blank forms c) to create horizontal rules for use as separators. You + define the look and use of fo:leader with the property "leader-pattern". It can have the following values: a) space. This + just creates an space. b) dots. This creates a sequence of "." c) rule. This creates a line. d) use-content. This creates a + repeating pattern of the content of fo:leader. + </fo:block> + + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + The dimensions of fo:leader are determined by the compound property leader-length. It consists of the + 3 sub values: leader-length.minimum (default = 0), leader-length.optimum (default = 12pt), leader-length.maximum + (default = 100%). If you want to make sure, that leader-length has a fixed size, you should use the compound + property (p.e. leader-length="5cm"). If you want to fill the rest of the remaining space with dots in a table of + content, you can use the default values. + </fo:block> + + <fo:block font-size="14pt" + font-family="sans-serif" + line-height="17pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start" + background-color="blue" + color="white"> + leader with leader-pattern="space" + </fo:block> + + <!-- Inserts a leader (space) --> + <fo:block text-align="start">Entry 1 + <fo:leader leader-pattern="space" + leader-length="6cm"/>p. 12 + </fo:block> + + <!-- Inserts a leader (space) --> + <fo:block text-align="start">Entry 2 + <fo:leader leader-pattern="space" + leader-length="6cm"/>p. 24 + </fo:block> + + <!-- Inserts a leader (space) --> + <fo:block text-align="start">Left side + <fo:leader leader-pattern="space" + leader-length="5.5cm"/>middle + <fo:leader leader-pattern="space" + leader-length="5.5cm"/>right side + </fo:block> + + + <fo:block font-size="14pt" + font-family="sans-serif" + line-height="17pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start" + background-color="blue" + color="white" + > + Using fo:leader with leader-pattern="dots" + </fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + There are two properties which allow you to specify the looks of the dotted line. First + "leader-pattern-width". It specifies the length of one dot and the space up to the next dot. + Second leader-alignment. It can be used to make sure, the dots in different lines are parallel (only value "reference-area" + is supported). + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 1 + <fo:leader leader-pattern="dots" + leader-length="6cm"/>p. 12 + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 2 + <fo:leader leader-pattern="dots" + leader-length="6cm"/>p. 24 + </fo:block> + + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + Using fo:leader with leader-pattern="dots" and leader-pattern-width="5pt" and "8pt" + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 1 + <fo:leader leader-pattern="dots" + leader-pattern-width="5pt" + leader-length="6cm"/>p. 12 + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 2 + <fo:leader leader-pattern="dots" + leader-pattern-width="5pt" + leader-length="6cm"/>p. 24 + </fo:block> + + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 1 + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm"/>p. 12 + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 2 + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm"/>p. 24 + </fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + Using fo:leader with leader-pattern="dots" in a list + </fo:block> + + <fo:block text-align="start" + space-before.optimum="12pt" + space-after.optimum="12pt"> + Using fo:leader with leader-pattern="dots", leader-pattern-width="5pt" and "8pt", leader-alignment="reference-area" + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 1 + <fo:leader leader-pattern="dots" + leader-pattern-width="5pt" + leader-alignment="reference-area" + leader-length="6cm"/>p. 12 + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 2 + <fo:leader leader-pattern="dots" + leader-pattern-width="5pt" + leader-alignment="reference-area" + leader-length="6cm"/>p. 24 + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 3 is longer + <fo:leader leader-pattern="dots" + leader-pattern-width="5pt" + leader-alignment="reference-area" + leader-length="6cm"/>p. 36 + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 4 is even longer + <fo:leader leader-pattern="dots" + leader-alignment="reference-area" + leader-pattern-width="5pt" + leader-length="6cm"/>p. 48 + </fo:block> + + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">1 + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm" + leader-alignment="reference-area"/>p. 12 + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 2 + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm" + leader-alignment="reference-area"/>p. 24 + </fo:block> + + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 3 is longer + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm" + leader-alignment="reference-area"/>p. 36 + </fo:block> + + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 4 is even longer + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm" + leader-alignment="reference-area"/>p. 48 + </fo:block> + + + + + <!-- list start --> + <!-- use provisional-distance-between-starts to define + the distance between the start of the label and the item text + + use provisional-label-separation to define the distance between + the end of the item label and the start of item text + --> + <fo:list-block provisional-distance-between-starts="0.3cm" + provisional-label-separation="0.15cm"> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-size="10pt" font-family="Symbol">·</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 1 + <fo:leader leader-pattern="dots" + leader-pattern-width="5pt" + leader-length="6cm"/>p. 12 + </fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-size="10pt" font-family="Symbol">·</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <!-- Inserts a leader (dots) --> + <fo:block text-align="start">Entry 2 + <fo:leader leader-pattern="dots" + leader-pattern-width="5pt" + leader-length="6cm"/>p. 24 + </fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + <!-- list end --> + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + Using fo:leader with leader-pattern="dots" in a table + </fo:block> + + + <!-- table start --> + <fo:table> + <fo:table-column column-width="20mm"/> + <fo:table-column column-width="60mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell ><fo:block>Entry 1</fo:block></fo:table-cell> + <fo:table-cell > + <fo:block text-align="start"> + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm"/> + </fo:block> + </fo:table-cell> + <fo:table-cell ><fo:block>p. 12</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>Entry 2 </fo:block></fo:table-cell> + <fo:table-cell > + <fo:block text-align="start"> + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm"/> + </fo:block> + </fo:table-cell> + <fo:table-cell ><fo:block>p. 24</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>Entry 3 </fo:block></fo:table-cell> + <fo:table-cell > + <fo:block text-align="start"> + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="6cm"/> + </fo:block> + </fo:table-cell> + <fo:table-cell ><fo:block>p. 36</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table end --> + + + + <fo:block text-align="center" + font-size="15pt" + space-before.optimum="16pt" + space-after.optimum="12pt"> + Table of Content + </fo:block> + + <fo:block text-align="start" + font-size="10pt" + space-after.optimum="12pt"> + shows the use of leader properties in combination to build a table of content. + Following values are used for the leader: + leader-pattern="dots" + leader-pattern-width="8pt" + leader-alignment="reference-area" + no leader-length is specified, so the default values are used (min: 0, opt: 12pt, max: 100%) + </fo:block> + + + <!-- Here starts the table --> + <fo:table> + <fo:table-column column-width="1cm"/> + <fo:table-column column-width="14.2cm"/> + <fo:table-column column-width="0.3cm"/> + <fo:table-body font-size="12pt" font-family="sans-serif"> + + <fo:table-row line-height="12pt"> + <fo:table-cell><fo:block text-align="end">A) </fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="start">This is some longer sample text<fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-alignment="reference-area" + /></fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="end">1</fo:block></fo:table-cell> + </fo:table-row> + + + <fo:table-row line-height="12pt"> + <fo:table-cell><fo:block text-align="end">B) </fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="start">Some text<fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-alignment="reference-area" + /></fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="end">2</fo:block></fo:table-cell> + </fo:table-row> + + <fo:table-row line-height="12pt"> + <fo:table-cell><fo:block text-align="end" >C) </fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="start">Text<fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-alignment="reference-area" + /></fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="end">3</fo:block></fo:table-cell> + </fo:table-row> + + <fo:table-row line-height="12pt"> + <fo:table-cell><fo:block text-align="end">D) </fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="start">This text is even longer than the first entry <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-alignment="reference-area" + /></fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="end">4</fo:block></fo:table-cell> + </fo:table-row> + + <fo:table-row line-height="12pt"> + <fo:table-cell><fo:block text-align="end">E) </fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="start">Shorter text example<fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-alignment="reference-area" + /></fo:block></fo:table-cell> + <fo:table-cell><fo:block text-align="end">5</fo:block></fo:table-cell> + </fo:table-row> + + </fo:table-body> + </fo:table> + + + + + + + <fo:block font-size="14pt" + font-family="sans-serif" + line-height="17pt" + space-before.optimum="15pt" + space-after.optimum="3pt" + text-align="start" + background-color="blue" + color="white" + > + Leader with leader-pattern="rule" + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="start">text before the rule (start) + <fo:leader leader-pattern="rule" + rule-thickness="3.0pt" + leader-length="6cm" + space-before.optimum="12pt" + space-after.optimum="12pt" + start-indent="1.5cm" + end-indent="2cm" + background-color="blue" + color="yellow"/> + text after the rule + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center">text before the rule (center) + <fo:leader leader-pattern="rule" + rule-thickness="3.0pt" + leader-length="6cm" + space-before.optimum="12pt" + space-after.optimum="12pt" + start-indent="1.5cm" + end-indent="2cm" + background-color="blue" + color="yellow"/> + text after the rule + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="end">text before the rule (end) + <fo:leader leader-pattern="rule" + rule-thickness="3.0pt" + leader-length="6cm" + space-before.optimum="12pt" + space-after.optimum="12pt" + start-indent="1.5cm" + end-indent="2cm" + background-color="blue" + color="yellow"/> + text after the rule + </fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + Here are some fo:leader with the property rule and different rule styles + (solid, dashed, dotted, double, groove, ridge the last one with colored backgrounds + to the effect) + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="1pt" + leader-length="6cm"/> + </fo:block> + + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + + <fo:leader leader-pattern="rule" + leader-length="6cm" + rule-thickness="1pt" + rule-style="dashed"/> + </fo:block> + + + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + leader-length="6cm" + rule-style="dotted" + rule-thickness="1pt"/> + </fo:block> + + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + leader-length="6cm" + rule-thickness="2pt" + rule-style="double"/> + </fo:block> + + <fo:block text-align="center" background-color="silver" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + leader-length="6cm" + rule-thickness="1pt" + rule-style="groove" + color="black" /> + </fo:block> + + <fo:block text-align="center" background-color="silver" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + leader-length="6cm" + rule-thickness="1pt" + rule-style="ridge" + color="black" /> + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + Here are 4 fo:leader with increasing rule-thickness (1pt, 2pt, 3pt, 4pt) + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="1.0pt" + leader-length="6cm"/> + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="2.0pt" + leader-length="6cm"/> + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="3.0pt" + leader-length="6cm"/> + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="4.0pt" + leader-length="6cm"/> + </fo:block> + + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-before.optimum="5pt" + space-after.optimum="3pt" + text-align="start"> + Here are 4 fo:leader with increasing rule-thickness (1pt, 2pt, 3pt, 4pt) and leader-length: 25%, 50%, 75%, 100% + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="1.0pt" + leader-length="25%"/> + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="2.0pt" + leader-length="50%"/> + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="3.0pt" + leader-length="75%"/> + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center" + space-before.optimum="12pt" + space-after.optimum="12pt"> + <fo:leader leader-pattern="rule" + rule-thickness="4.0pt" + leader-length="100%"/> + </fo:block> + + + <fo:block text-align="center" + font-size="15pt" + space-before.optimum="16pt" + space-after.optimum="12pt"> + Using leader in combination with justified text + </fo:block> + + + <fo:block text-align="justify">Here is some longer text. Here is some longer text. + Here is some longer text. Here comes the leader (dots width 8pt): + <fo:leader leader-pattern="dots" + leader-pattern-width="8pt" + leader-length="5cm"/>Here is some longer text. Here is some longer text. + Here is some longer text. Here is some longer text. Here is some longer text. + </fo:block> + + <fo:block text-align="justify">Here is some longer text. Here is some longer text. + Here is some longer text. Here comes the leader (dots width 5pt): + <fo:leader leader-pattern="dots" + leader-pattern-width="5pt" + leader-length="5cm"/>Here is some longer text. Here is some longer text. + Here is some longer text. Here is some longer text. Here is some longer text. + </fo:block> + + <fo:block text-align="justify">Here is some longer text. Here is some longer text. + Here is some longer text. Here comes the leader (dots): + <fo:leader leader-pattern="dots" + leader-length="5cm"/>Here is some longer text. Here is some longer text. + Here is some longer text. Here is some longer text. Here is some longer text. + </fo:block> + + + <fo:block text-align="justify">Here is some longer text. Here is some longer text. + Here is some longer text. Here comes the leader (rule): + <fo:leader leader-pattern="rule" + leader-length="5cm"/>Here is some longer text. Here is some longer text. + Here is some longer text. Here is some longer text. Here is some longer text. + </fo:block> + + <fo:block text-align="justify">Here is some longer text. Here is some longer text. + Here is some longer text. Here comes the leader (space): + <fo:leader leader-pattern="space" + leader-length="5cm"/>Here is some longer text. Here is some longer text. + Here is some longer text. Here is some longer text. Here is some longer text. + </fo:block> + + <fo:block space-before.optimum="15pt" font-weight="bold" font-size="14pt"> + Use-Content + </fo:block> + + <fo:block space-before.optimum="8pt" font-size="12pt"> + The following examples show Leader with "use-content". + The inline areas from the context of the leader are + repeated until the lenght of the leader. The + "leader-pattern-width" can be used to set the width + of each repeated pattern element. <fo:inline font-style="italic"> + If this width is less than the inline areas then the width + of the inline areas is used.</fo:inline> + </fo:block> + + <fo:block space-before.optimum="5pt" text-align="start">Characters: + <fo:leader leader-pattern="use-content">abcd</fo:leader> + </fo:block> + + <fo:block space-before.optimum="5pt" text-align="start">Set width: + <fo:leader leader-pattern="use-content" + leader-pattern-width="50pt">abcd</fo:leader> + </fo:block> + + <fo:block space-before.optimum="5pt" text-align="start">Small Width: + <fo:leader leader-pattern="use-content" + leader-pattern-width="2pt">abcd</fo:leader> + </fo:block> + + <fo:block space-before.optimum="5pt" text-align="start">SVG: + <fo:leader leader-pattern="use-content"> +<fo:instream-foreign-object> +<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"> +<rect x="0" y="0" width="5" height="5" style="fill:red"/> +<rect x="5" y="5" width="5" height="5" style="fill:black"/> +</svg> +</fo:instream-foreign-object> + </fo:leader> + </fo:block> + + <fo:block space-before.optimum="5pt" text-align="start">Mixed: + <fo:leader leader-pattern="use-content"> +abc +<fo:instream-foreign-object> +<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"> +<rect x="0" y="0" width="5" height="5" style="fill:red"/> +<rect x="5" y="5" width="5" height="5" style="fill:black"/> +</svg> +</fo:instream-foreign-object> + </fo:leader> + </fo:block> + + <fo:block space-before.optimum="5pt" text-align="start">Mixed: + <fo:leader leader-pattern="use-content"> +abc +<fo:instream-foreign-object> +<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"> +<rect x="0" y="0" width="5" height="5" style="fill:red"/> +<rect x="5" y="5" width="5" height="5" style="fill:black"/> +</svg> +</fo:instream-foreign-object> +def + </fo:leader> + </fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/link.fo b/examples/fo/basic/link.fo new file mode 100644 index 000000000..805d258f4 --- /dev/null +++ b/examples/fo/basic/link.fo @@ -0,0 +1,145 @@ +<?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> + <fo:simple-page-master master-name="first" + 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:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="first"> + + <!-- text body --> + <fo:flow flow-name="xsl-region-body"> + + <!-- Normal text --> + <fo:block text-align="center">0. Normal text without link + </fo:block> + + + <!-- Normal text --> + <fo:block text-align="center" + font-family="serif">1. <fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link> + </fo:block> + + <!-- Normal text --> + <fo:block text-align="center">---</fo:block> + + <!-- Normal text --> + <fo:block text-align="center"> + 2. A one line example (text-align='start'): <fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link> + </fo:block> + + <!-- Normal text --> + <fo:block text-align="center">---</fo:block> + + <!-- Normal text --> + <fo:block text-align="start" hyphenate="true" language="en"> + 3. A multiline text (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> + + <!-- Normal text --> + <fo:block text-align="center">---</fo:block> + + <!-- Normal text --> + <fo:block text-align="center"> + 4. A multiline text (text-align='centered'). 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> + + <!-- Normal text --> + <fo:block text-align="center">---</fo:block> + + <!-- Normal text --> + <fo:block text-align="end"> + 5. A multiline text (text-align='end'). 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> + + <!-- Normal text --> + <fo:block text-align="center">---</fo:block> + + <!-- Normal text --> + <fo:block text-align="justify" hyphenate="true" language="en"> + 6. A multiline text (text-align='justify'). 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> + + <!-- Normal text --> + <fo:block text-align="center">---</fo:block> + + <!-- Normal text --> + <fo:block text-align="start" + space-before.optimum="6pt" + line-height="24pt" + font-family="serif" + padding-top="3pt" + > + 7. A multiline text (text-align='start', space-before.optimum=6pt, font-family=serif padding-top="3pt"). The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to + enable <fo:basic-link external-destination="normal.pdf">generic</fo:basic-link> 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> + + <!-- Normal text --> + <fo:block text-align="start" + space-before.optimum="6pt" + line-height="24pt" + font-family="serif" + padding-top="3pt" + > + 8. A multiline text (text-align='start', space-before.optimum=6pt, font-family=serif, padding-top="3pt"). The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to + enable <fo:basic-link external-destination="normal.pdf">generic</fo:basic-link> 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> + + <!-- Normal text --> + <fo:block text-align="start" + space-before.optimum="6pt" + line-height="24pt" + font-family="serif" + padding-top="3pt" + > + 9. Linking to a specific page of an external: + <fo:basic-link external-destination="extensive.pdf#page=1">extensive.pdf, Page 2</fo:basic-link>. + </fo:block> + + <!-- Normal text --> +<!-- <fo:block text-align="start" + space-before.optimum="6pt" + line-height="24pt" + font-family="serif" + padding-top="3pt" + > + 8. A multiline text (text-align='start', space-before.optimum=6pt, font-family=serif, padding-top="3pt"). The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to + enable <fo:basic-link external-destination="normal.pdf">generic</fo:basic-link> 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> +--> + + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/list.fo b/examples/fo/basic/list.fo new file mode 100644 index 000000000..b9e1035f1 --- /dev/null +++ b/examples/fo/basic/list.fo @@ -0,0 +1,2690 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- example for use of list elements + At the beginning the page layout is set. + Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions + +--> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + In this case there is only a simple-page-master which defines the + layout for all pages of the text + --> + <!-- layout information --> + <fo:simple-page-master master-name="simple" + page-height="29.7cm" + page-width="21cm" + margin-top="2cm" + margin-bottom="2cm" + margin-left="2.5cm" + margin-right="2.5cm"> + <fo:region-body margin-top="0cm"/> + <fo:region-before extent="2cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + </fo:layout-master-set> + <!-- end: defines page layout --> + + + <!-- start page-sequence + here comes the text (contained in flow objects) + the page-sequence can contain different fo:flows + the attribute value of master-name refers to the page layout + which is to be used to layout the text contained in this + page-sequence--> + <fo:page-sequence master-reference="simple"> + + <!-- start fo:flow + each flow is targeted + at one (and only one) of the following: + xsl-region-body (usually: normal text) + xsl-region-before (usually: header) + xsl-region-after (usually: footer) + xsl-region-start (usually: left margin) + xsl-region-end (usually: right margin) + ['usually' applies here to languages with left-right and top-down + writing direction like English] + in this case there is only one target: xsl-region-body + --> + <fo:flow flow-name="xsl-region-body"> + + <!-- each paragraph is encapsulated in a block element + the attributes of the block define + font-family and size, line-heigth etc. --> + + <!-- this defines a 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="3pt"> + How to use list elements + </fo:block> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center"> + A simple list with bullets in list-item-label + </fo:block> + + + <!-- list --> + <fo:list-block > + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + <!-- end list --> + + <!-- code --> + <fo:block font-size="10pt" + font-family="Courier" + line-height="10pt" + text-align="start" + space-before.optimum="3cm" + white-space-collapse="false" + linefeed-treatment="preserve" + white-space-treatment="preserve" + wrap-option="no-wrap"> +<![CDATA[<!-- list start --> +<fo:list-block> + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <fo:inline font-family="Symbol">·</fo:inline> + </fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + [other list items...] + + +</fo:list-block> +<!-- end list --> +]]> + +</fo:block> + + <!-- code ends --> + + +<!-- ***************************** Next page ************************ --> + + + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + Doing it better + </fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + space-before.optimum="15pt"> + The distance between the bullets and the list text in the example on the + previous page is too large. You can define this distance and some more. Here is + an overview how to specify what aspects of a list + </fo:block> + + <!-- the following image is taken from the w3c xsl working draft 18 October 2000 + authors: Sharon Adler, Anders Berglund, Jeff Caruso, Stephen Deach + Paul Grosso, Eduardo Gutentag, Alex Milowski, Scott Parnell, + Jeremy Richman, Steve Zilles + url: http://www.w3.org/TR/xsl/ --> + <fo:block text-align="center" + space-before.optimum="0.5cm"> + <fo:external-graphic src="file:../graphics/listgeometry.gif"/> + </fo:block> + <fo:block font-size="10pt" + font-family="sans-serif" + text-align="center" + space-after.optimum="15pt"> + image from the w3c xsl working draft 18.10.2000 (full info in list2.fo) + </fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + space-before.optimum="15pt"> + This is the same list with a defined provisional-distance-between-starts (0.3cm) and + provisional-label-separation (0.15cm). + </fo:block> + + <!-- list start --> + <!-- use provisional-distance-between-starts to define + the distance between the start of the label and the item text + + use provisional-label-separation to define the distance between + the end of the item label and the start of item text + --> + <fo:list-block provisional-distance-between-starts="0.3cm" + provisional-label-separation="0.15cm"> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-size="10pt" font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-size="10pt" font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-size="10pt" font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + <!-- end list --> + + <!-- code --> + <fo:block font-size="10pt" + font-family="Courier" + line-height="10pt" + text-align="start" + space-before.optimum="0.7cm" + white-space-collapse="false" + white-space-treatment="preserve" + linefeed-treatment="preserve" + wrap-option="no-wrap"> +<![CDATA[<!-- list start --> +<fo:list-block provisional-distance-between-starts="0.3cm" + provisional-label-separation="0.15cm"> + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <fo:inline font-family="Symbol">·</fo:inline> + </fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + [other list items...] + +</fo:list-block> +<!-- end list --> +]]> +</fo:block> + + <!-- code ends --> + +<!-- ***************************** Next page ************************ --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + A simple list with text before and after + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + text-align="start" + > + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + </fo:block> + + <!-- list --> + <fo:list-block provisional-distance-between-starts="0.3cm" + provisional-label-separation="0.15cm"> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + <!-- end list --> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="start" + > + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + </fo:block> + <!-- normal text ends --> + +<!-- ***************************** Next page ************************ --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + A list with longer text + </fo:block> + + <!-- list --> + <fo:list-block provisional-distance-between-starts="0.3cm" + provisional-label-separation="0.15cm"> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + <!-- end list --> + +<!-- ***************************** Next page ************************ --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + A simple list with long labels + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + text-align="start" + > + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + </fo:block> + + <!-- list --> + <fo:list-block provisional-distance-between-starts="2.0cm" + provisional-label-separation="0.2cm"> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">label 1)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">lab. 2)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">lab. 3)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">lab. 4)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">lab. 5)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + <!-- end list --> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="start" + > + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + </fo:block> + <!-- normal text ends --> + + +<!-- ***************************** Next page ************************ --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + line-height="20pt" + space-after.optimum="15pt" + text-align="center" + padding-top="3pt" + break-before="page"> + A long list + </fo:block> + + <!-- list --> + <fo:list-block provisional-distance-between-starts="0.3cm" + provisional-label-separation="0.15cm"> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + <!-- end list --> + + +<!-- ***************************** Next page ************************ --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + A nested list with justified text + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + text-align="justify" + > + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + </fo:block> + + <!-- list level 1 --> + <fo:list-block provisional-distance-between-starts="0.4cm" + provisional-label-separation="0.15cm"> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify">here comes a nested list with numbers + + <!-- start nested list --> + <!-- list level 1 --> + <fo:list-block provisional-distance-between-starts="0.7cm" + provisional-label-separation="0.15cm"> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">1.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">2.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">3.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">4.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">5.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block > + <!-- end nested list --> + + <!-- continuing list--> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + <!-- end list --> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="justify" + > + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + </fo:block> + <!-- normal text ends --> + +<!-- ****************************** Next Page ************************* --> + + <!-- code --> + <fo:block font-size="10pt" + font-family="Courier" + line-height="10pt" + text-align="start" + space-before.optimum="3cm" + white-space-collapse="false" + white-space-treatment="preserve" + linefeed-treatment="preserve" + wrap-option="no-wrap"> +<![CDATA[<!-- list level 1 --> +<fo:list-block provisional-distance-between-starts="0.4cm" + provisional-label-separation="0.15cm"> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify">here comes a nested list with numbers + + <!-- start nested list --> + <!-- list level 1 --> + <fo:list-block provisional-distance-between-starts="0.7cm" + provisional-label-separation="0.15cm"> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">1.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item </fo:block> + </fo:list-item-body> + </fo:list-item> + + [more item in nested list ...] + + </fo:list-block> + <!-- end nested list --> + + <!-- continuing list--> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + [more item in list ...] + +</fo:list-block> +<!-- end list --> + +]]> +</fo:block> +<!-- ***************************** Next page ************************ --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page" + white-space-collapse="true"> + A long nested list + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + text-align="justify" + > + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + </fo:block> + + <!-- list level 1 --> + <fo:list-block provisional-distance-between-starts="0.4cm" + provisional-label-separation="0.15cm"> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify">here comes a nested list with numbers + + <!-- start nested list --> + <!-- list level 1 --> + <fo:list-block provisional-distance-between-starts="0.9cm" + provisional-label-separation="0.15cm"> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">1.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">2.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">3.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">4.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">5.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">6.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">7.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">8.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">9.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">10.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">11.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">12.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">13.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">14.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">15.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">16.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- nested list item --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a number --> + <fo:list-item-label end-indent="label-end()"> + <fo:block text-align="end">17.)</fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + nested list item with more text. nested list item with more text. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block > + <!-- end nested list --> + + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <!-- list entry --> + <fo:list-item start-indent="0.5cm"> + <!-- insert a bullet --> + <fo:list-item-label end-indent="label-end()"> + <fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> + </fo:list-item-label> + <!-- list text --> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align="justify"> + here is text in the list item body. here is text in the list item body. + here is text in the list item body. here is text in the list item body. + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + <!-- end list --> + + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="justify" + > + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. + </fo:block> + <!-- normal text ends --> + + + + + </fo:flow> <!-- closes the flow element--> + </fo:page-sequence> <!-- closes the page-sequence --> +</fo:root> diff --git a/examples/fo/basic/newlinktest.fo b/examples/fo/basic/newlinktest.fo new file mode 100644 index 000000000..6fa0588d5 --- /dev/null +++ b/examples/fo/basic/newlinktest.fo @@ -0,0 +1,148 @@ +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + margin-top="1in" + margin-bottom="1in" + margin-left="1in" + margin-right="1in"> + <fo:region-body margin-top="2.5cm" margin-bottom="1.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="first"> + + <!-- header --> + <fo:static-content flow-name="xsl-region-before"> + <fo:block text-align="end" + font-size="8pt" + font-family="serif" + line-height="14pt" > + <fo:basic-link external-destination="http://xml.apache.org/fop" + color="rgb(150,150,150)" font-style="italic"> + http://xml.apache.org/fop + </fo:basic-link> + </fo:block> + </fo:static-content> + + +<fo:flow flow-name="xsl-region-body"> + + <fo:block space-after.optimum="3pt" font-family="serif" id="block1"> + FOP is the world's first print formatter driven by XSL formatting + objects. It is a Java 1.1 application that reads a formatting object + tree and then turns it into a PDF document. The formatting object + tree, can be in the form of an XML document (output by an XSLT engine + like XT or Xalan) or can be passed in memory as a DOM Document or (in + the case of XT) SAX events. + </fo:block> + + <fo:block space-after.optimum="12pt" font-family="serif">FOP is part of Apache's XML project. The homepage of FOP is + <fo:inline font-style="italic" font-family="serif"><fo:basic-link color="blue" external-destination="http://xml.apache.org/fop">http://xml.apache.org/fop</fo:basic-link></fo:inline> + </fo:block> + +<fo:block space-after.optimum="12pt" font-family="serif" font-weight="bold" text-align="center"> +align="start" +</fo:block> + +<fo:block space-after.optimum="12pt" font-family="serif" text-align="start"> + Apache FOP is the world's first print formatter driven by XSL formatting + objects. It is a Java 1.1 application that reads a <fo:basic-link internal-destination="block1" color="blue">formatting object</fo:basic-link> + tree and then turns it into a <fo:basic-link internal-destination="block1" color="blue">PDF document</fo:basic-link>. The formatting object + tree, can be in the form of an XML <fo:basic-link internal-destination="block1" color="blue">document</fo:basic-link> (output by an XSLT engine + like XT or Xalan) or can be passed in memory as a DOM Document or (in + the case of XT) SAX events. + + </fo:block> + +<fo:block space-after.optimum="12pt" font-family="serif" font-weight="bold" text-align="center"> +align="center" +</fo:block> + +<fo:block space-after.optimum="12pt" font-family="serif" text-align="center"> + Apache FOP is the world's first print formatter driven by XSL formatting + objects. It is a Java 1.1 application that reads a <fo:basic-link internal-destination="block1" color="blue">formatting object</fo:basic-link> + tree and then turns it into a <fo:basic-link internal-destination="block1" color="blue">PDF document</fo:basic-link>. The formatting object + tree, can be in the form of an XML <fo:basic-link internal-destination="block1" color="blue">document</fo:basic-link> (output by an XSLT engine + like XT or Xalan) or can be passed in memory as a DOM Document or (in + the case of XT) SAX events. + + </fo:block> + +<fo:block space-after.optimum="12pt" font-family="serif" font-weight="bold" text-align="center"> +align="justify" +</fo:block> + + <fo:block space-after.optimum="12pt" font-family="serif" text-align="justify"> + Apache FOP is the world's first print formatter driven by XSL formatting + objects. It is a Java 1.1 application that reads a <fo:basic-link internal-destination="block1" color="blue">formatting object</fo:basic-link> + tree and then turns it into a <fo:basic-link internal-destination="block1" color="blue">PDF document</fo:basic-link>. The formatting object + tree, can be in the form of an XML <fo:basic-link internal-destination="block1" color="blue">document</fo:basic-link> (output by an XSLT engine + like XT or Xalan) or can be passed in memory as a DOM Document or (in + the case of XT) SAX events. + + </fo:block> + +<!-- table start --> + <fo:table> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell ><fo:block>good</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>bad</fo:block></fo:table-cell> + <fo:table-cell ><fo:block><fo:basic-link internal-destination="block1" color="blue">ugly</fo:basic-link></fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>nice</fo:block></fo:table-cell> + <fo:table-cell ><fo:block><fo:basic-link internal-destination="block1" color="blue">dice</fo:basic-link></fo:block></fo:table-cell> + <fo:table-cell ><fo:block>vice</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>literature</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>music</fo:block></fo:table-cell> + <fo:table-cell ><fo:block><fo:basic-link internal-destination="block1" color="blue">art</fo:basic-link></fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block><fo:basic-link internal-destination="block1" color="blue">java</fo:basic-link></fo:block></fo:table-cell> + <fo:table-cell ><fo:block>perl</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>python</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table end --> + + <fo:block break-before="page" space-after.optimum="12pt" font-family="serif" text-align="start" font-weight="bold"> + Links in different orientations + </fo:block> + + <fo:block> + This block container has a different reference orientation. + <fo:block-container reference-orientation="90" inline-progression-dimension="150pt"> + <fo:block> + A link applies to the inline parent area that is created + by the basic-link. This inline area has a trait specifying + the link. + </fo:block> + <fo:block> + <fo:basic-link external-destination="http://xml.apache.org/fop" + color="blue" text-decoration="underline"> + http://xml.apache.org/fop + </fo:basic-link> + </fo:block> + </fo:block-container> + </fo:block> + + +</fo:flow> + +</fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/normal.fo b/examples/fo/basic/normal.fo new file mode 100644 index 000000000..6576e70a0 --- /dev/null +++ b/examples/fo/basic/normal.fo @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<!-- example for a simple fo file. At the beginning the page layout is set. +Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations, +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + - page-sequence-masters: have the role of describing the sequence + of page-masters that will be used to generate + pages during the formatting of an fo:page-sequence + + --> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + page-height="21cm" + page-width="29.7cm" + 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> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + 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="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <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" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="basicPSM"> + + <!-- 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="3pt" + font-variant="small-caps"> + 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="3pt"> + 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 <fo:inline font-variant="small-caps">Extensible Markup Language (XML)</fo:inline> 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. + </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="3pt"> + 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. + </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> diff --git a/examples/fo/basic/normalex.fo b/examples/fo/basic/normalex.fo new file mode 100644 index 000000000..9f063ee34 --- /dev/null +++ b/examples/fo/basic/normalex.fo @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<!-- example for a simple fo file. At the beginning the page layout is set. +Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations, +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + - page-sequence-masters: have the role of describing the sequence + of page-masters that will be used to generate + pages during the formatting of an fo:page-sequence + + --> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + page-height="21cm" + page-width="29.7cm" + margin-top="6.3cm - 3.8cm - 1.5cm" + margin-bottom="3cm - (.25cm * 4)" + margin-left="2.0cm + 0.5cm" + margin-right="(5cm * 1cm) div 2cm"> + <fo:region-body margin-top="3cm"/> + <fo:region-before extent="1cm + 3cm - 1cm"/> + <fo:region-after extent="2 * .5cm + .5cm"/> + </fo:simple-page-master> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + page-height="abs(-30cm + .3cm)" + page-width="(10cm * 2) + 1cm" + margin-top="round(.5) * 1cm" + margin-bottom="round(2.4) * 1cm" + margin-left="2.5 * 1cm" + margin-right="5.5cm - 3cm"> + <fo:region-body margin-top="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <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" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="basicPSM"> + + <!-- header --> + <fo:static-content flow-name="xsl-region-before"> + <fo:block text-align="end" + font-size="10pt" + font-family="serif" + line-height="1em + 4pt" > + 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="min(18pt,20pt)" + font-family="sans-serif" + line-height="max(24pt,18pt)" + space-after.optimum="5 mod 3 * 7.5pt" + background-color="rgb(0,0,255)" + color="rgb(100%,100%,100%)" + text-align="center" + padding-top="3pt"> + Extensible Markup Language (XML) 1.0 + </fo:block> + + <!-- defines text title level 2--> + <fo:block font-size="floor(16.3) * 1pt" + font-family="sans-serif" + line-height="2pt * ceiling(9.3)" + space-before.optimum="10pt" + space-after.optimum="10pt" + text-align="start" + padding-top="3pt"> + Abstract + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="2 * (.5em + 1.5pt)" + space-after.optimum=".25 * 1em" + 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. + </fo:block> + + <!-- defines text title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + line-height="1.25" + space-before.optimum="10pt" + space-after.optimum="10pt" + text-align="start" + padding-top="3pt"> + 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. + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after.optimum="1pc div 4" + 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> diff --git a/examples/fo/basic/pdfoutline.fo b/examples/fo/basic/pdfoutline.fo new file mode 100644 index 000000000..027a87bd5 --- /dev/null +++ b/examples/fo/basic/pdfoutline.fo @@ -0,0 +1,1413 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- +THIS IS NOT THE LATEST VERSION OF THE FOP DOCUMENTATION BUT ONLY AN EXAMPLE FILE + +This files shows next to the trivial usage of fo:block and fo:inline examples of +- fo:basic-link external-destination +- fo:basic-link internal-destination +- fo:table +- fo:list-block (including a bullet from the font Symbol as list-item-label) +- fo:page-number-citation (computes dynamically the page number in section 'content') +--> + +<!-- note the extensions namespace (fox) --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xml.apache.org/fop/extensions"> + <fo:layout-master-set> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + 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> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + 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="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <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" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + +<!-- beginning of the PDF outline extensions --> + <fox:bookmarks> + + <fox:outline internal-destination="sec1"> + <fox:label>What is FOP?</fox:label> + </fox:outline> + + <fox:outline internal-destination="sec2"> + <fox:label>Downloading FOP</fox:label> + </fox:outline> + + <fox:outline internal-destination="sec3"> + <fox:label>Running FOP</fox:label> + + <fox:outline internal-destination="sec3-1"> + <fox:label>Prerequisites</fox:label> + + <fox:outline internal-destination="sec3-1-1"> + <fox:label>Java 1.1</fox:label> + </fox:outline> + + <fox:outline internal-destination="sec3-1-2"> + <fox:label>XML Parser</fox:label> + </fox:outline> + + <fox:outline internal-destination="sec3-1-3"> + <fox:label>XSLT Processor</fox:label> + </fox:outline> + + </fox:outline> + + <fox:outline internal-destination="sec3-2"> + <fox:label>Starting FOP</fox:label> + </fox:outline> + + </fox:outline> + + <fox:outline internal-destination="sec4"> + <fox:label>Embedding FOP</fox:label> + </fox:outline> + + <fox:outline internal-destination="sec5"> + <fox:label>What's Implemented?</fox:label> + </fox:outline> + <fox:outline internal-destination="sec6"> + <fox:label>Limitations</fox:label> + </fox:outline> + <fox:outline internal-destination="sec7"> + <fox:label>Bugs</fox:label> + </fox:outline> + <fox:outline internal-destination="sec8"> + <fox:label>Compiling FOP</fox:label> + </fox:outline> + <fox:outline internal-destination="sec9"> + <fox:label>Getting Involved</fox:label> + </fox:outline> + <fox:outline internal-destination="sec10"> + <fox:label>FOP Relevant Specifications</fox:label> + </fox:outline> + <fox:outline internal-destination="sec11"> + <fox:label>License</fox:label> + </fox:outline> + </fox:bookmarks> + + + + <!-- actual layout --> + <fo:page-sequence master-reference="basicPSM"> + + +<fo:static-content flow-name="xsl-region-before"> +<fo:block text-align="end" font-size="10pt" font-family="serif" line-height="14pt" color="red" > +This is not the latest Fop documentation, but just an fo example. FOP - p. <fo:page-number/> +</fo:block> +</fo:static-content> + + +<fo:flow flow-name="xsl-region-body"> + +<fo:block id="secA" font-size="18pt" font-family="sans-serif" line-height="24pt" space-after.optimum="15pt" background-color="blue" color="white" text-align="center" padding-top="3pt">FOP: An Open-Source XSL Formatter and Renderer</fo:block> + + + +<fo:block id="sec1" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >A) + What is FOP?</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">FOP is the world's first print formatter driven by XSL formatting + objects. It is a Java 1.1 application that reads a formatting object + tree and then turns it into a PDF document. The formatting object + tree, can be in the form of an XML document (output by an XSLT engine + like XT or Xalan) or can be passed in memory as a DOM Document or (in + the case of XT) SAX events. + + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">FOP is part of Apache's XML project. The homepage of FOP is + <fo:inline font-style="italic" font-family="serif"><fo:basic-link color="blue" external-destination="http://xml.apache.org/fop">http://xml.apache.org/fop</fo:basic-link></fo:inline> + </fo:block> + + + + + <fo:block id="sec2" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >B) + Downloading FOP</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">The latest release version is <fo:inline font-style="italic" font-family="serif">FOP +0.14</fo:inline> <fo:inline font-family="serif"> + () + </fo:inline>. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">NOTE: you do not have to unjar or unzip this jar file.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Documentation can be downloaded here as <fo:inline font-style="italic" font-family="serif">HMTL file</fo:inline> +<fo:inline font-family="serif"> + () + </fo:inline> or + as <fo:inline font-style="italic" font-family="serif">PDF file</fo:inline> +<fo:inline font-family="serif"> + () + </fo:inline>.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">To run FOP from the command line, see Running FOP. If you are interested in + embedding FOP in a Java application of your own, see Embedding FOP. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">You can also download the <fo:inline font-style="italic" font-family="serif">source code v. 0.14</fo:inline> +<fo:inline font-family="serif"> + () + </fo:inline> as jar file</fo:block> + + + + <fo:block id="sec3" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >C) + Running FOP</fo:block> + + <fo:block id="sec3-1" font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >1) Prerequisites</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Following software must be installed:</fo:block> + <fo:block id="sec3-1-1" space-after.optimum="3pt" font-family="serif">a) Java 1.1.x or later</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">For the fo-file viewer mode of FOP (see below) you must have the swing classes installed. + From Java 1.2 on (aka Java 2) they are part of the standard java distribution. + If you use Java 1.1.x you must seperately include the swing classes, which can + be found at the <fo:inline font-style="italic" font-family="serif"> + Sun website</fo:inline> +<fo:inline font-family="serif"> + (http://java.sun.com/products/jfc/#download-swing) + </fo:inline>. + </fo:block> + <fo:block id="sec3-1-2" space-after.optimum="3pt" font-family="serif">b) An XML parser which supports SAX and DOM like + <fo:inline font-style="italic" font-family="serif">Xerces-J</fo:inline> +<fo:inline font-family="serif"> + (http://xml.apache.org/xerces-j/index.html) + </fo:inline>.</fo:block> + <fo:block id="sec3-1-3" space-after.optimum="3pt" font-family="serif">c) If you have to produce the flow objects files, which are the input for FOP, + you need a transformation utility to create this files from your xml files. + Normally this is an XSLT stylesheet processor like + <fo:inline font-style="italic" font-family="serif">XT</fo:inline> +<fo:inline font-family="serif"> + (http://www.jclark.com/xml/xt.html) + </fo:inline> + or <fo:inline font-style="italic" font-family="serif">XALAN</fo:inline> +<fo:inline font-family="serif"> + (http://xml.apache.org/xalan/index.html) + </fo:inline>. + </fo:block> + + + <fo:block id="sec3-2" font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >2) Starting FOP as an standalone application</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">There are three ways to run FOP from the command line.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">a) Batch processing formatting objects (fo) files: </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java org.apache.fop.apps.CommandLine fo-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">b) Batch processing xml files (includes production of the fo-files):</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">c) Previewing the fo-file:</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java org.apache.fop.apps.AWTCommandLine fo-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Each method uses next to the fop classes other packages. The following describes + each method in detail.</fo:block> + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >a) Method One</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">One is to first use an XSLT engine to produce the formatting object tree as an + XML document and then running the class org.apache.fop.apps.CommandLine with the + formatting object file name and PDF filename as arguments. You will need to include + FOP and your XML Parser in your classpath and so you might invoke + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java -cp fop_x_xx_x.jar;xerces.jar</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">org.apache.fop.apps.CommandLine fo-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">If your SAX Parser is other than Xerces, you will need to set the property + org.xml.sax.parser to the SAX Parser class to use. The following example shows + the command line, if you use XP, the XML parser from James Clark: + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">-cp fop_x_xx_x.jar;sax.jar;xt.jar;xp.jar;xerces.jar</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">org.apache.fop.apps.AWTCommandLine formatting-tree-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">(You have to include xerces.jar or another xml parser which supports DOM in your classpath.) </fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >b) Method Two</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Rather than performing transformation with an XSLT before invoking FOP, it is + possible, if you use XT as your XSLT engine, to just call FOP and have it call + XT for you. To do this, run the class org.apache.fop.apps.CommandLine with the + source XML file name, XSL file name and PDF file name as arguments. You will + need to include FOP, SAX, your SAX Parser and XT in your classpath and so you might + invoke + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">-cp fop_x_xx_x.jar;xt.jar;xerces.jar</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Again, if your SAX Parser is other than Xerces, you will need to set the property + org.xml.sax.parser to the SAX Parser class to use. + </fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >c) Method Three</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">If you already produced the FO file, you can preview the results of your + transformation without using any pdf viewer by invoking FOP with the viewer + application. You will need to include FOP and your XML Parser in your classpath + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java -cp fop_x_xx_x.jar;xerces.jar</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">org.apache.fop.apps.AWTCommandLine fo-file </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">The viewer uses the swing classes.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Note: If you are using java 2 or later (i.e. jdk 1.2. or later) you can put all + needed jar files into the subdirectory jdk1.2.x\jre\lib\ext (windows example). Then + FOP can be started without classpath: + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java org.apache.fop.apps.CommandLine fo-file pdf-file</fo:block> + + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >3) Running FOP on MacOS</fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">Ensure that you have a recent MRJ, and that you have downloaded and + unpacked the XP and SAX distributions. The xp.jar and sax.jar files work + as is on MacOS. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Drag the FOP jarfile onto the JBindery icon. When the first dialog + appears, type "org.apache.fop.apps.CommandLine" in the "Class name" field. + Using UNIX syntax, type the names of the input formatting-object file and + the output PDF in the "Optional parameters" field. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Click on the Classpath icon. To add the xp.jar and sax.jar files, click + the "Add .zip file" button, navigate to the file in question, and click + Open. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Once both are added (the FOP jarfile will already be in the list), click + Run. A "stdout" window will appear and display FOP runtime messages. + </fo:block> + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >4) Problems</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">If you have problems running FOP, please have a look at the + <fo:inline font-style="italic" font-family="serif">FOP FAQ</fo:inline> +<fo:inline font-family="serif"> + (faq.html) + </fo:inline>. If you don't find a solution there, + you can ask for help on the list fop-dev@xml.apache.org. Maybe it's bug and + maybe somebody is already working on it. + </fo:block> + + + + + <fo:block id="sec4" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >D) + Embedding FOP </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Instantiate org.apache.fop.apps.Driver. Once this class is + instantiated, methods are called to set the + Renderer to use, the (possibly multiple) ElementMapping(s) to + use and the PrintWriter to use to output the results of the + rendering (where applicable). In the case of the Renderer and + ElementMapping(s), the Driver may be supplied either with the + object itself, or the name of the class, in which case Driver will + instantiate the class itself. The advantage of the latter is it + enables runtime determination of Renderer and ElementMapping(s). + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Once the Driver is set up, the buildFOTree method + is called. Depending on whether DOM or SAX is being used, the + invocation of the method is either buildFOTree(Document) or + buildFOTree(Parser, InputSource) respectively. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">A third possibility may be used to build the FO Tree, namely + calling getDocumentHandler() and firing the SAX events yourself. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Once the FO Tree is built, the format() and render() methods may be + called in that order. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Here is an example use of Driver from CommandLine.java:</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">Driver driver = new Driver();</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.setWriter(new PrintWriter(new FileWriter(args[1])));</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.buildFOTree(parser, fileInputSource(args[0]));</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.format();</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.render();</fo:block> + + + + + + + <fo:block id="sec5" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >E) + What's Implemented?</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Also see STATUS for what is being worked on.</fo:block> + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >1) Formatting Objects</fo:block> + <fo:list-block start-indent="1cm" provisional-distance-between-starts="12pt" font-family="serif"> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>root </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>layout-master-set </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>simple-page-master </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>region-body </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>region-before </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>region-after </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-sequence </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>sequence-specification </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>sequence-specifier-single </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>sequence-specifier-repeating </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>sequence-specifier-alternating </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>flow </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>static-content </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>block </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>list-block </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>list-item </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>list-item-label </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>list-item-body </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-number </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>display-sequence </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>inline </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>display-rule </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>display-graphic </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table-column (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table-body (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table-row (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table-cell (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + </fo:list-block> + + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >2) Properties</fo:block> + <fo:list-block start-indent="1cm" provisional-distance-between-starts="12pt" font-family="serif"> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>end-indent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-name </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-first </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-repeating </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-odd </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-even </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>margin-top (only on pages and regions)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>margin-bottom (only on pages and regions)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>margin-left (only on pages and regions)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>margin-right (only on pages and regions)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>extent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-width </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-height </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>flow-name </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>font-family </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>font-style </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>font-weight </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>font-size </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>line-height </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>text-align </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>text-align-last </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>space-before.optimum </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>space-after.optimum </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>start-indent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>end-indent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>provisional-distance-between-starts </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>provisional-label-separation </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>rule-thickness </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>color </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>wrap-option </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>white-space-treatment </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>break-before </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>break-after </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>text-indent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>href</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>column-width</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>background-color</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>padding-top (only in conjunction with background color)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>padding-left (only in conjunction with background color)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>padding-bottom (only in conjunction with background color)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>padding-right (only in conjunction with background color)</fo:block> +</fo:list-item-body> +</fo:list-item> + </fo:list-block> + + + + + + + <fo:block id="sec6" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >F) + Limitations</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Although FOP implements the above listed fo objects and properties, sometimes it does so + only in a limited way. + </fo:block> + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >list-block</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">The fo working draft allows describes two ways to markup lists.The list-block must have as + children either: 1) pairs of fo:list-item-label and fo:list-item-body formatting objects, or + 2) fo:list-item formatting objects.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">At the moment FOP only implements the second way. Therefore a list has a basic structure like this:</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:list-block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:list-item></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:list-item-label><fo:block></fo:block></fo:list-item-label></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:list-item-body><fo:block></fo:block></fo:list-item-body></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"></fo:list-item></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"></fo:list-block></fo:block> + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >Padding</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Padding works in conjunction with indents and spaces. It is only implemented + for blocks. At the moment padding can't be used to make extra space (indents+spaces + must be used), but only to control how much the background-color extends beyond + the content rectangle. + </fo:block> + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >Tables</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">There two limitations for tables: 1) FOP needs you to explicitly specify column widths + 2) Cells have to contain block-level FOs. They can't contain straight character data. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">A working basic example of a table looks like this: </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:table></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-column column-width="150pt"/></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-column column-width="150pt"/></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-body font-size="10pt" font-family="sans-serif"></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-body></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"></fo:table></fo:block> + + + + + + + + + + + + <fo:block id="sec7" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >G) + Bugs</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">see STATUS file</fo:block> + + + + + + + <fo:block id="sec8" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >H) + Compiling FOP</fo:block> + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >1. Prerequisites</fo:block> + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >a) Java 1.1.x or later</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">If you use Java 1.1.x you must also seperately include the swing classes, which can + be found at the <fo:inline font-style="italic" font-family="serif"> + Sun website</fo:inline> +<fo:inline font-family="serif"> + (http://java.sun.com/products/jfc/#download-swing) + </fo:inline>. From Java 1.2 on (aka Java 2) they are part of the standard + distribution. + </fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >b) An XML parser</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">An XML parser which supports DOM like + <fo:inline font-style="italic" font-family="serif">Xerces-J</fo:inline> +<fo:inline font-family="serif"> + (http://xml.apache.org/xerces-j/index.html) + </fo:inline>.</fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >c) XT from James Clark</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Some of the Java source code in FOP is generated from XML using + XSLT. XT must be used to generate this code.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">XT is an XSL stylesheet processor written in java. At the moment you + can't use any other processor, because the make file makes use of some + proprietary features of Clark's xt which allow to write output in more + then one document. You can find XT at <fo:inline font-style="italic" font-family="serif"> + James Clark's website</fo:inline> +<fo:inline font-family="serif"> + (http://www.jclark.com/xml/xt.html) + </fo:inline>. You have to use XT version 19991105 or later.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">(Under windows you shouldn't use the prepackaged xt.exe but also the + generic jar file, otherwise make won't work) + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">XT relies on an sax parser like XP (also J. Clark), which can be + downloaded at <fo:inline font-style="italic" font-family="serif">James + Clark's Website</fo:inline> +<fo:inline font-family="serif"> + (http://www.jclark.com/xml/xp/index.html) + </fo:inline> + </fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >d) make</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Under windows it has been reported that the use of the cygnus solutions port + of the GNU utilities works. You can find it at + <fo:inline font-style="italic" font-family="serif">Cygnus Solutions</fo:inline> +<fo:inline font-family="serif"> + (http://sourceware.cygnus.com/cygwin/) + </fo:inline> + </fo:block> + + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >Compiling FOP on MacOS</fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">We strongly recommend the use of Codewarrior Java. This Readme will + contain a link to more information in the near future. + </fo:block> + + + + + + + + <fo:block id="sec9" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >I) + Getting involved</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">1. Subscribe to fop-dev@xml.apache.org by sending an email + to fop-dev-subscribe@xml.apache.org</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">2. Read the archives to fop-dev to get an idea of the issues being + discussed. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">3. Subscribe to fop-cvs@xml.apache.org by sending an email to + fop-cvs-subscribe@xml.apache.org (it is important + that you follow changes being made). </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">4. Try :-) to wrap your head around the XSL working draft. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">5. Get CVS working on your system. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">6. Ask, on fop-dev, any questions you have at all about the code, design, etc. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">7. When you feel comfortable modifying the code, send diffs to + fop-dev with your contributions. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">8. Have fun!</fo:block> + + + + + + + <fo:block id="sec10" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >J) + FOP Relevant Specifications</fo:block> + <fo:list-block start-indent="1cm" provisional-distance-between-starts="12pt" font-family="serif"> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">XML Recommendation</fo:inline> +<fo:inline font-family="serif" > + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">XSL-FO Working Draft</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/WD-xsl/">http://www.w3.org/TR/WD-xsl/</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">XSLT Recommendation</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">PDF Documentation</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://partners.adobe.com/asn/developer/acrosdk/DOCS/pdfspec.pdf">http://partners.adobe.com/asn/developer/acrosdk/DOCS/pdfspec.pdf</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">Simple API for XML (SAX)</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.megginson.com/SAX/">http://www.megginson.com/SAX/</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">Document Object Model (DOM)</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/REC-DOM-Level-1">http://www.w3.org/TR/REC-DOM-Level-1</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">Namespaces in XML Recommendation</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">Java JDK 1.1 Documentation</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://java.sun.com/products/jdk/1.1/docs/index.html">http://java.sun.com/products/jdk/1.1/docs/index.html</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + </fo:list-block> + + + + + + + <fo:block id="sec11" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >K) + Licence</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> ============================================================================</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> The Apache Software License, Version 1.1</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> ============================================================================</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> Copyright (C) 1999 The Apache Software Foundation. All rights reserved.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met:</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">3. The end-user documentation included with the redistribution, if any, must + include the following acknowledgment: "This product includes software + developed by the Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowledgment may appear in the software itself, if + and wherever such third-party acknowledgments normally appear. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">4. The names "FOP" and "Apache Software Foundation" must not be used to + endorse or promote products derived from this software without prior + written permission. For written permission, please contact + apache@apache.org. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">5. Products derived from this software may not be called "Apache", nor may + "Apache" appear in their name, without prior written permission of the + Apache Software Foundation. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif"> + This software consists of voluntary contributions made by many individuals + on behalf of the Apache Software Foundation and was originally created by + James Tauber <jtauber@jtauber.com>. For more information on the Apache + Software Foundation, please see <fo:inline font-style="italic" font-family="serif">http://www.apache.org/</fo:inline> +<fo:inline font-family="serif"> + (http://www.apache.org/) + </fo:inline>. + </fo:block> + +<fo:block font-size="14pt" font-family="sans-serif" line-height="10pt" space-after.optimum="15pt" font-weight="bold" start-indent="15pt" break-before="page"> + Content + </fo:block> +<fo:table> +<fo:table-column column-width="1cm"/> +<fo:table-column column-width="12cm"/> +<fo:table-column column-width="1cm"/> +<fo:table-body font-size="10pt" font-family="sans-serif"> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">A) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec1">What is FOP?</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec1"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">B) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec2">Downloading FOP</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec2"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">C) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec3">Running FOP</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec3"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">D) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec4">Embedding FOP</fo:basic-link> </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec4"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">E) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec5">What's Implemented?</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec5"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">F) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec6">Limitations</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec6"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">G) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec7">Bugs</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec7"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">H) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec8">Compiling FOP</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec8"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">I) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec9">Getting involved</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec9"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">J) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec10">FOP Relevant Specifications</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec10"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">K) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec11">Licence</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec11"/></fo:block> +</fo:table-cell> +</fo:table-row> +</fo:table-body> +</fo:table> + + + +</fo:flow> +</fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/readme.fo b/examples/fo/basic/readme.fo new file mode 100644 index 000000000..fd9e58c61 --- /dev/null +++ b/examples/fo/basic/readme.fo @@ -0,0 +1,1341 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- +THIS IS NOT THE LATEST VERSION OF THE FOP DOCUMENTATION BUT ONLY AN EXAMPLE FILE + +This files shows next to the trivial usage of fo:block and fo:inline examples of +- fo:basic-link external-destination +- fo:basic-link internal-destination +- fo:table +- fo:list-block (including a bullet from the font Symbol as list-item-label) +- fo:page-number-citation (computes dynamically the page number in section 'content') +--> + + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + 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> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + 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="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <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" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="basicPSM"> + + +<fo:static-content flow-name="xsl-region-before"> +<fo:block text-align="end" font-size="10pt" font-family="serif" line-height="14pt" color="red" > +This is not the latest Fop documentation, but just an fo example. FOP - p. <fo:page-number/> +</fo:block> +</fo:static-content> + + +<fo:flow flow-name="xsl-region-body"> +<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="3pt">FOP: An Open-Source XSL Formatter and Renderer</fo:block> +<fo:block id="sec1" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >A) + What is FOP?</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">FOP is the world's first print formatter driven by XSL formatting + objects. It is a Java 1.1 application that reads a formatting object + tree and then turns it into a PDF document. The formatting object + tree, can be in the form of an XML document (output by an XSLT engine + like XT or Xalan) or can be passed in memory as a DOM Document or (in + the case of XT) SAX events. + + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">FOP is part of Apache's XML project. The homepage of FOP is + <fo:inline font-style="italic" font-family="serif"><fo:basic-link color="blue" external-destination="http://xml.apache.org/fop">http://xml.apache.org/fop</fo:basic-link></fo:inline> + </fo:block> + + + + <fo:block id="sec2" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >B) + Downloading FOP</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">The latest release version is <fo:inline font-style="italic" font-family="serif">FOP +0.14</fo:inline> <fo:inline font-family="serif"> + () + </fo:inline>. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">NOTE: you do not have to unjar or unzip this jar file.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Documentation can be downloaded here as <fo:inline font-style="italic" font-family="serif">HMTL file</fo:inline> +<fo:inline font-family="serif"> + () + </fo:inline> or + as <fo:inline font-style="italic" font-family="serif">PDF file</fo:inline> +<fo:inline font-family="serif"> + () + </fo:inline>.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">To run FOP from the command line, see Running FOP. If you are interested in + embedding FOP in a Java application of your own, see Embedding FOP. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">You can also download the <fo:inline font-style="italic" font-family="serif">source code v. 0.14</fo:inline> +<fo:inline font-family="serif"> + () + </fo:inline> as jar file</fo:block> + + + + + + <fo:block id="sec3" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >C) + Running FOP</fo:block> + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >1) Prerequisites</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Following software must be installed:</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">a) Java 1.1.x or later</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">For the fo-file viewer mode of FOP (see below) you must have the swing classes installed. + From Java 1.2 on (aka Java 2) they are part of the standard java distribution. + If you use Java 1.1.x you must seperately include the swing classes, which can + be found at the <fo:inline font-style="italic" font-family="serif"> + Sun website</fo:inline> +<fo:inline font-family="serif"> + (http://java.sun.com/products/jfc/#download-swing) + </fo:inline>. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">b) An XML parser which supports SAX and DOM like + <fo:inline font-style="italic" font-family="serif">Xerces-J</fo:inline> +<fo:inline font-family="serif"> + (http://xml.apache.org/xerces-j/index.html) + </fo:inline>.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">c) If you have to produce the flow objects files, which are the input for FOP, + you need a transformation utility to create this files from your xml files. + Normally this is an XSLT stylesheet processor like + <fo:inline font-style="italic" font-family="serif">XT</fo:inline> +<fo:inline font-family="serif"> + (http://www.jclark.com/xml/xt.html) + </fo:inline> + or <fo:inline font-style="italic" font-family="serif">XALAN</fo:inline> +<fo:inline font-family="serif"> + (http://xml.apache.org/xalan/index.html) + </fo:inline>. + </fo:block> + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >2) Starting FOP as an standalone application</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">There are three ways to run FOP from the command line.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">a) Batch processing formatting objects (fo) files: </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java org.apache.fop.apps.CommandLine fo-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">b) Batch processing xml files (includes production of the fo-files):</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">c) Previewing the fo-file:</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java org.apache.fop.apps.AWTCommandLine fo-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Each method uses next to the fop classes other packages. The following describes + each method in detail.</fo:block> + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >a) Method One</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">One is to first use an XSLT engine to produce the formatting object tree as an + XML document and then running the class org.apache.fop.apps.CommandLine with the + formatting object file name and PDF filename as arguments. You will need to include + FOP and your XML Parser in your classpath and so you might invoke + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java -cp fop_x_xx_x.jar;xerces.jar</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">org.apache.fop.apps.CommandLine fo-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">If your SAX Parser is other than Xerces, you will need to set the property + org.xml.sax.parser to the SAX Parser class to use. The following example shows + the command line, if you use XP, the XML parser from James Clark: + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">-cp fop_x_xx_x.jar;sax.jar;xt.jar;xp.jar;xerces.jar</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">org.apache.fop.apps.AWTCommandLine formatting-tree-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">(You have to include xerces.jar or another xml parser which supports DOM in your classpath.) </fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >b) Method Two</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Rather than performing transformation with an XSLT before invoking FOP, it is + possible, if you use XT as your XSLT engine, to just call FOP and have it call + XT for you. To do this, run the class org.apache.fop.apps.CommandLine with the + source XML file name, XSL file name and PDF file name as arguments. You will + need to include FOP, SAX, your SAX Parser and XT in your classpath and so you might + invoke + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">-cp fop_x_xx_x.jar;xt.jar;xerces.jar</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Again, if your SAX Parser is other than Xerces, you will need to set the property + org.xml.sax.parser to the SAX Parser class to use. + </fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >c) Method Three</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">If you already produced the FO file, you can preview the results of your + transformation without using any pdf viewer by invoking FOP with the viewer + application. You will need to include FOP and your XML Parser in your classpath + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java -cp fop_x_xx_x.jar;xerces.jar</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">org.apache.fop.apps.AWTCommandLine fo-file </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">The viewer uses the swing classes.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Note: If you are using java 2 or later (i.e. jdk 1.2. or later) you can put all + needed jar files into the subdirectory jdk1.2.x\jre\lib\ext (windows example). Then + FOP can be started without classpath: + </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">java org.apache.fop.apps.CommandLine fo-file pdf-file</fo:block> + + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >3) Running FOP on MacOS</fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">Ensure that you have a recent MRJ, and that you have downloaded and + unpacked the XP and SAX distributions. The xp.jar and sax.jar files work + as is on MacOS. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Drag the FOP jarfile onto the JBindery icon. When the first dialog + appears, type "org.apache.fop.apps.CommandLine" in the "Class name" field. + Using UNIX syntax, type the names of the input formatting-object file and + the output PDF in the "Optional parameters" field. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Click on the Classpath icon. To add the xp.jar and sax.jar files, click + the "Add .zip file" button, navigate to the file in question, and click + Open. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Once both are added (the FOP jarfile will already be in the list), click + Run. A "stdout" window will appear and display FOP runtime messages. + </fo:block> + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >4) Problems</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">If you have problems running FOP, please have a look at the + <fo:inline font-style="italic" font-family="serif">FOP FAQ</fo:inline> +<fo:inline font-family="serif"> + (faq.html) + </fo:inline>. If you don't find a solution there, + you can ask for help on the list fop-dev@xml.apache.org. Maybe it's bug and + maybe somebody is already working on it. + </fo:block> + + + + + <fo:block id="sec4" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >D) + Embedding FOP </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Instantiate org.apache.fop.apps.Driver. Once this class is + instantiated, methods are called to set the + Renderer to use, the (possibly multiple) ElementMapping(s) to + use and the PrintWriter to use to output the results of the + rendering (where applicable). In the case of the Renderer and + ElementMapping(s), the Driver may be supplied either with the + object itself, or the name of the class, in which case Driver will + instantiate the class itself. The advantage of the latter is it + enables runtime determination of Renderer and ElementMapping(s). + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Once the Driver is set up, the buildFOTree method + is called. Depending on whether DOM or SAX is being used, the + invocation of the method is either buildFOTree(Document) or + buildFOTree(Parser, InputSource) respectively. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">A third possibility may be used to build the FO Tree, namely + calling getDocumentHandler() and firing the SAX events yourself. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Once the FO Tree is built, the format() and render() methods may be + called in that order. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Here is an example use of Driver from CommandLine.java:</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">Driver driver = new Driver();</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.setWriter(new PrintWriter(new FileWriter(args[1])));</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.buildFOTree(parser, fileInputSource(args[0]));</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.format();</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt">driver.render();</fo:block> + + + + + + + <fo:block id="sec5" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >E) + What's Implemented?</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Also see STATUS for what is being worked on.</fo:block> + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >1) Formatting Objects</fo:block> + <fo:list-block start-indent="1cm" provisional-distance-between-starts="12pt" font-family="serif"> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>root </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>layout-master-set </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>simple-page-master </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>region-body </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>region-before </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>region-after </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-sequence </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>sequence-specification </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>sequence-specifier-single </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>sequence-specifier-repeating </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>sequence-specifier-alternating </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>flow </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>static-content </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>block </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>list-block </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>list-item </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>list-item-label </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>list-item-body </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-number </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>display-sequence </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>inline </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>display-rule </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>display-graphic </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table-column (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table-body (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table-row (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>table-cell (minimal support)</fo:block> +</fo:list-item-body> +</fo:list-item> + </fo:list-block> + + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >2) Properties</fo:block> + <fo:list-block start-indent="1cm" provisional-distance-between-starts="12pt" font-family="serif"> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>end-indent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-name </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-first </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-repeating </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-odd </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-master-even </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>margin-top (only on pages and regions)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>margin-bottom (only on pages and regions)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>margin-left (only on pages and regions)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>margin-right (only on pages and regions)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>extent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-width </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>page-height </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>flow-name </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>font-family </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>font-style </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>font-weight </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>font-size </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>line-height </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>text-align </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>text-align-last </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>space-before.optimum </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>space-after.optimum </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>start-indent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>end-indent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>provisional-distance-between-starts </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>provisional-label-separation </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>rule-thickness </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>color </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>wrap-option </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>white-space-treatment </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>break-before </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>break-after </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>text-indent </fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>href</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>column-width</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>background-color</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>padding-top (only in conjunction with background color)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>padding-left (only in conjunction with background color)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>padding-bottom (only in conjunction with background color)</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block>padding-right (only in conjunction with background color)</fo:block> +</fo:list-item-body> +</fo:list-item> + </fo:list-block> + + + + + + + <fo:block id="sec6" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >F) + Limitations</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Although FOP implements the above listed fo objects and properties, sometimes it does so + only in a limited way. + </fo:block> + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >list-block</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">The fo working draft allows describes two ways to markup lists.The list-block must have as + children either: 1) pairs of fo:list-item-label and fo:list-item-body formatting objects, or + 2) fo:list-item formatting objects.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">At the moment FOP only implements the second way. Therefore a list has a basic structure like this:</fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:list-block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:list-item></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:list-item-label><fo:block></fo:block></fo:list-item-label></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:list-item-body><fo:block></fo:block></fo:list-item-body></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"></fo:list-item></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"></fo:list-block></fo:block> + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >Padding</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Padding works in conjunction with indents and spaces. It is only implemented + for blocks. At the moment padding can't be used to make extra space (indents+spaces + must be used), but only to control how much the background-color extends beyond + the content rectangle. + </fo:block> + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >Tables</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">There two limitations for tables: 1) FOP needs you to explicitly specify column widths + 2) Cells have to contain block-level FOs. They can't contain straight character data. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">A working basic example of a table looks like this: </fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"><fo:table></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-column column-width="150pt"/></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-column column-width="150pt"/></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-body font-size="10pt" font-family="sans-serif"></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> <fo:block>text</fo:block></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-cell></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-row></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"> </fo:table-body></fo:block> + <fo:block font-size="10pt" font-family="monospace" line-height="12pt" space-before.optimum="0pt" space-after.optimum="0pt"></fo:table></fo:block> + + + + + + + + + + + + <fo:block id="sec7" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >G) + Bugs</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">see STATUS file</fo:block> + + + + + + + <fo:block id="sec8" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >H) + Compiling FOP</fo:block> + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >1. Prerequisites</fo:block> + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >a) Java 1.1.x or later</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">If you use Java 1.1.x you must also seperately include the swing classes, which can + be found at the <fo:inline font-style="italic" font-family="serif"> + Sun website</fo:inline> +<fo:inline font-family="serif"> + (http://java.sun.com/products/jfc/#download-swing) + </fo:inline>. From Java 1.2 on (aka Java 2) they are part of the standard + distribution. + </fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >b) An XML parser</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">An XML parser which supports DOM like + <fo:inline font-style="italic" font-family="serif">Xerces-J</fo:inline> +<fo:inline font-family="serif"> + (http://xml.apache.org/xerces-j/index.html) + </fo:inline>.</fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >c) XT from James Clark</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Some of the Java source code in FOP is generated from XML using + XSLT. XT must be used to generate this code.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">XT is an XSL stylesheet processor written in java. At the moment you + can't use any other processor, because the make file makes use of some + proprietary features of Clark's xt which allow to write output in more + then one document. You can find XT at <fo:inline font-style="italic" font-family="serif"> + James Clark's website</fo:inline> +<fo:inline font-family="serif"> + (http://www.jclark.com/xml/xt.html) + </fo:inline>. You have to use XT version 19991105 or later.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">(Under windows you shouldn't use the prepackaged xt.exe but also the + generic jar file, otherwise make won't work) + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">XT relies on an sax parser like XP (also J. Clark), which can be + downloaded at <fo:inline font-style="italic" font-family="serif">James + Clark's Website</fo:inline> +<fo:inline font-family="serif"> + (http://www.jclark.com/xml/xp/index.html) + </fo:inline> + </fo:block> + + + <fo:block font-size="14pt" font-family="serif" line-height="16pt" space-before.optimum="8pt" space-after.optimum="4pt" >d) make</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">Under windows it has been reported that the use of the cygnus solutions port + of the GNU utilities works. You can find it at + <fo:inline font-style="italic" font-family="serif">Cygnus Solutions</fo:inline> +<fo:inline font-family="serif"> + (http://sourceware.cygnus.com/cygwin/) + </fo:inline> + </fo:block> + + + + <fo:block font-size="16pt" font-family="serif" line-height="18pt" space-before.optimum="8pt" space-after.optimum="8pt" >Compiling FOP on MacOS</fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">We strongly recommend the use of Codewarrior Java. This Readme will + contain a link to more information in the near future. + </fo:block> + + + + + + + + <fo:block id="sec9" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >I) + Getting involved</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">1. Subscribe to fop-dev@xml.apache.org by sending an email + to fop-dev-subscribe@xml.apache.org</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">2. Read the archives to fop-dev to get an idea of the issues being + discussed. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">3. Subscribe to fop-cvs@xml.apache.org by sending an email to + fop-cvs-subscribe@xml.apache.org (it is important + that you follow changes being made). </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">4. Try :-) to wrap your head around the XSL working draft. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">5. Get CVS working on your system. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">6. Ask, on fop-dev, any questions you have at all about the code, design, etc. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">7. When you feel comfortable modifying the code, send diffs to + fop-dev with your contributions. </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">8. Have fun!</fo:block> + + + + + + + <fo:block id="sec10" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >J) + FOP Relevant Specifications</fo:block> + <fo:list-block start-indent="1cm" provisional-distance-between-starts="12pt" font-family="serif"> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">XML Recommendation</fo:inline> +<fo:inline font-family="serif" > + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">XSL-FO Working Draft</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/WD-xsl/">http://www.w3.org/TR/WD-xsl/</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">XSLT Recommendation</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">PDF Documentation</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://partners.adobe.com/asn/developer/acrosdk/DOCS/pdfspec.pdf">http://partners.adobe.com/asn/developer/acrosdk/DOCS/pdfspec.pdf</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">Simple API for XML (SAX)</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.megginson.com/SAX/">http://www.megginson.com/SAX/</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">Document Object Model (DOM)</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/REC-DOM-Level-1">http://www.w3.org/TR/REC-DOM-Level-1</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">Namespaces in XML Recommendation</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + <fo:list-item> +<fo:list-item-label end-indent="label-end()"> +<fo:block><fo:inline font-family="Symbol">•</fo:inline></fo:block> +</fo:list-item-label> +<fo:list-item-body start-indent="body-start()"> +<fo:block> +<fo:inline font-style="italic" font-family="serif">Java JDK 1.1 Documentation</fo:inline> +<fo:inline font-family="serif"> + (<fo:basic-link color="blue" external-destination="http://java.sun.com/products/jdk/1.1/docs/index.html">http://java.sun.com/products/jdk/1.1/docs/index.html</fo:basic-link>) + </fo:inline> +</fo:block> +</fo:list-item-body> +</fo:list-item> + </fo:list-block> + + + + + + + <fo:block id="sec11" font-size="18pt" font-family="serif" line-height="20pt" space-before.optimum="20pt" space-after.optimum="14pt" >K) + Licence</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> ============================================================================</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> The Apache Software License, Version 1.1</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> ============================================================================</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> Copyright (C) 1999 The Apache Software Foundation. All rights reserved.</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif"> Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met:</fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">3. The end-user documentation included with the redistribution, if any, must + include the following acknowledgment: "This product includes software + developed by the Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowledgment may appear in the software itself, if + and wherever such third-party acknowledgments normally appear. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">4. The names "FOP" and "Apache Software Foundation" must not be used to + endorse or promote products derived from this software without prior + written permission. For written permission, please contact + apache@apache.org. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif">5. Products derived from this software may not be called "Apache", nor may + "Apache" appear in their name, without prior written permission of the + Apache Software Foundation. + </fo:block> + <fo:block space-after.optimum="3pt" font-family="serif">THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + </fo:block> + + <fo:block space-after.optimum="3pt" font-family="serif"> + This software consists of voluntary contributions made by many individuals + on behalf of the Apache Software Foundation and was originally created by + James Tauber <jtauber@jtauber.com>. For more information on the Apache + Software Foundation, please see <fo:inline font-style="italic" font-family="serif">http://www.apache.org/</fo:inline> +<fo:inline font-family="serif"> + (http://www.apache.org/) + </fo:inline>. + </fo:block> + +<fo:block font-size="14pt" font-family="sans-serif" line-height="10pt" space-after.optimum="15pt" font-weight="bold" start-indent="15pt" break-before="page"> + Content + </fo:block> +<fo:table> +<fo:table-column column-width="1cm"/> +<fo:table-column column-width="12cm"/> +<fo:table-column column-width="1cm"/> +<fo:table-body font-size="10pt" font-family="sans-serif"> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">A) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec1">What is FOP?</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec1"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">B) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec2">Downloading FOP</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec2"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">C) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec3">Running FOP</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec3"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">D) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec4">Embedding FOP</fo:basic-link> </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec4"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">E) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec5">What's Implemented?</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec5"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">F) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec6">Limitations</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec6"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">G) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec7">Bugs</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec7"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">H) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec8">Compiling FOP</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec8"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">I) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec9">Getting involved</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec9"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">J) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec10">FOP Relevant Specifications</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec10"/></fo:block> +</fo:table-cell> +</fo:table-row> +<fo:table-row line-height="12pt"> +<fo:table-cell> +<fo:block text-align="end">K) + </fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="start"><fo:basic-link color="blue" internal-destination="sec11">Licence</fo:basic-link></fo:block> +</fo:table-cell> +<fo:table-cell> +<fo:block text-align="end"><fo:page-number-citation ref-id="sec11"/></fo:block> +</fo:table-cell> +</fo:table-row> +</fo:table-body> +</fo:table> + + + +</fo:flow> +</fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/simple.fo b/examples/fo/basic/simple.fo new file mode 100644 index 000000000..12cc43010 --- /dev/null +++ b/examples/fo/basic/simple.fo @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- example for a simple fo file. At the beginning the page layout is set. + Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions +--> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + In this case there is only a simple-page-master which defines the + layout for all pages of the text + --> + <!-- layout information --> + <fo:simple-page-master master-name="simple" + 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:layout-master-set> + <!-- end: defines page layout --> + + + <!-- start page-sequence + here comes the text (contained in flow objects) + the page-sequence can contain different fo:flows + the attribute value of master-name refers to the page layout + which is to be used to layout the text contained in this + page-sequence--> + <fo:page-sequence master-reference="simple"> + + <!-- start fo:flow + each flow is targeted + at one (and only one) of the following: + xsl-region-body (usually: normal text) + xsl-region-before (usually: header) + xsl-region-after (usually: footer) + xsl-region-start (usually: left margin) + xsl-region-end (usually: right margin) + ['usually' applies here to languages with left-right and top-down + writing direction like English] + in this case there is only one target: xsl-region-body + --> + <fo:flow flow-name="xsl-region-body"> + + <!-- each paragraph is encapsulated in a block element + the attributes of the block define + font-family and size, line-heigth etc. --> + + <!-- this defines a title --> + <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="3pt"> + Extensible Markup Language (XML) 1.0 + </fo:block> + + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="justify"> + 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. + </fo:block> + + <!-- this defines normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="justify"> + 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. + </fo:block> + + </fo:flow> <!-- closes the flow element--> + </fo:page-sequence> <!-- closes the page-sequence --> +</fo:root> diff --git a/examples/fo/basic/table.fo b/examples/fo/basic/table.fo new file mode 100644 index 000000000..0f5d7cf1c --- /dev/null +++ b/examples/fo/basic/table.fo @@ -0,0 +1,504 @@ +<?xml version="1.0" encoding="utf-8"?> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + + <!-- defines the layout master --> + <fo:layout-master-set> + <fo:simple-page-master master-name="first" + 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:layout-master-set> + + <!-- starts actual layout --> + <fo:page-sequence master-reference="first"> + + <fo:flow flow-name="xsl-region-body"> + + <!-- this defines a 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="3pt"> + How to use table elements + </fo:block> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center"> + A simple table, 3 columns, 4 rows + </fo:block> + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + <!-- table start --> + <fo:table> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell ><fo:block>good</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>bad</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>ugly</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>nice</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>dice</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>vice</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>literature</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>music</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>art</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>java</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>perl</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>python</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table end --> + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + +<!-- **************************** NEW PAGE ************************************* --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + A table with borders + </fo:block> + + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + + <!-- table start --> + <fo:table border-width="0.5mm" border-style="solid" background-color="yellow"> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell ><fo:block>good</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>bad</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>ugly</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>nice</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>dice</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>vice</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>literature</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>music</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>art</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>java</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>perl</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>python</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table end --> + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + +<!-- **************************** NEW PAGE ************************************* --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + A table with thick borders + </fo:block> + + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + + <!-- table start --> + <fo:table border-width="3mm" border-style="solid" background-color="yellow"> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell ><fo:block>good</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>bad</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>ugly</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>nice</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>dice</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>vice</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>literature</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>music</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>art</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell ><fo:block>java</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>perl</fo:block></fo:table-cell> + <fo:table-cell ><fo:block>python</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table end --> + + <!-- normal text --> + <fo:block text-align="start" start-indent="-3mm">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + +<!-- **************************** NEW PAGE ************************************* --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + A table with borders around the cells + </fo:block> + + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + + <!-- table start --> + <fo:table border-collapse="separate"> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>good</fo:block></fo:table-cell> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>bad</fo:block></fo:table-cell> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>ugly</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>nice</fo:block></fo:table-cell> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>dice</fo:block></fo:table-cell> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>vice</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>literature</fo:block></fo:table-cell> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>music</fo:block></fo:table-cell> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>art</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>java</fo:block></fo:table-cell> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>perl</fo:block></fo:table-cell> + <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>python</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table end --> + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + +<!-- **************************** NEW PAGE ************************************* --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + 2 tables with thick borders around the cells + </fo:block> + + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + + <!-- table start --> + <fo:table border-collapse="separate"> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>good</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>bad</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>ugly</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>nice</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>dice</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>vice</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>literature</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>music</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>art</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>java</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>perl</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>python</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table end --> + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + <!-- table start --> + <fo:table border-collapse="separate"> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-column column-width="50mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>good</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>bad</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>ugly</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>nice</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>dice</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>vice</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>literature</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>music</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>art</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>java</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>perl</fo:block></fo:table-cell> + <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>python</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table end --> + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + +<!-- **************************** NEW PAGE ************************************* --> + + <!-- this defines a title level 2--> + <fo:block font-size="16pt" + font-family="sans-serif" + space-after.optimum="15pt" + text-align="center" + break-before="page"> + 5 tables with borders + </fo:block> + + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + + <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)"> + <fo:table-column column-width="150mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell><fo:block>bad</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + + + <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)" > + <fo:table-column column-width="150mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell><fo:block>bad</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + + + <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)" > + <fo:table-column column-width="150mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell><fo:block>bad</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + + <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)"> + <fo:table-column column-width="150mm"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell><fo:block>bad</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + + <!-- normal text --> + <fo:block text-align="start">this is normal text. this is normal text. this is normal text. + this is normal text. this is normal text. this is normal text. + </fo:block> + + +<!-- **************************** NEW PAGE ************************************* --> + <fo:block font-size="16pt" + font-family="sans-serif" + line-height="20pt" + space-after.optimum="3pt" + break-before="page" + text-align="justify"> + A Contents table + </fo:block> + + <!-- Here starts the table --> + <fo:table> + <fo:table-column column-width="1cm"/> + <fo:table-column column-width="15cm"/> + <fo:table-body font-size="10pt" font-family="sans-serif"> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">A) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">What is FOP?</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">B) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">Downloading FOP</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">C) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">Running FOP</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">D) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">Embedding FOP </fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">E) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">What's Implemented?</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">F) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">Limitations</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">G) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">Bugs</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">H) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">Compiling FOP</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">I) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">Getting involved</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">J) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">FOP Relevant Specifications</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row line-height="12pt"> + <fo:table-cell> + <fo:block text-align="end">K) </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start">Licence</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/tableunits.fo b/examples/fo/basic/tableunits.fo new file mode 100644 index 000000000..cfc672d67 --- /dev/null +++ b/examples/fo/basic/tableunits.fo @@ -0,0 +1,221 @@ +<?xml version="1.0" encoding="utf-8"?> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + + <!-- defines the layout master --> + <fo:layout-master-set> + <fo:simple-page-master master-name="first" + 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"/> + <fo:region-before extent="3cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + </fo:layout-master-set> + + <!-- starts actual layout --> + <fo:page-sequence master-reference="first"> + + <fo:flow flow-name="xsl-region-body"> + + <!-- normal text --> + <fo:block space-after="1cm" text-align="start" padding="0.4in" + border="thick solid red">Table unit tests</fo:block> + <fo:table border-collapse="collapse" width="6in"> + <fo:table-column column-width="(4.5in - 2cm) div 3 +1in" background-color="yellow"/> + <fo:table-column column-width="(4.5in - 2cm) div 3 + 0.5in" background-color="blue"/> + <fo:table-column column-width="(4.5in - 2cm) div 3 + 2.0cm" background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>fixed width columns</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <!-- table start --> + <fo:table border-collapse="collapse" width="6in"> + <fo:table-column column-width="1in + proportional-column-width(1)" background-color="yellow"/> + <fo:table-column column-width="2 * (proportional-column-width(1) + .5in) div 2" background-color="blue"/> + <fo:table-column column-width="proportional-column-width(1) + 2.0cm" background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell background-color="blue"><fo:block>default alignment +</fo:block></fo:table-cell> + <fo:table-cell height="3cm" background-color="green" display-align="center"><fo:block>Centered with height=3cm</fo:block></fo:table-cell> + <fo:table-cell background-color="yellow" display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row height="3cm"> + <fo:table-cell><fo:block>default alignment but with a height +of 3cm on the row </fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> +<fo:block space-before="12pt" space-after="6pt"> +The next table has width=100% on the table no column widths specified on the table-column element. +</fo:block> + <!-- table start --> + <fo:table border-collapse="collapse" width="100%"> + <fo:table-column background-color="yellow"/> + <fo:table-column background-color="blue"/> + <fo:table-column background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + +<fo:block space-before="12pt" space-after="6pt"> +The next table has fixed column widths=13cm, ipd.optimum=12cm and ipd.max = 100%. +</fo:block> + <!-- table start --> + <fo:table border-collapse="collapse" inline-progression-dimension="12cm" + inline-progression-dimension.maximum="100%"> + <fo:table-column column-width="8cm" background-color="yellow"/> + <fo:table-column column-width="proportional-column-width(2)" background-color="blue"/> + <fo:table-column column-width="5cm" background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table><fo:block space-before="12pt" space-after="6pt"> +The next table has fixed column widths=16.5cm, ipd.optimum=14cm and ipd.max = 100% (16cm). +</fo:block> + <!-- table start --> + <fo:table border-collapse="collapse" inline-progression-dimension="14cm" + inline-progression-dimension.maximum="100%"> + <fo:table-column column-width="8.5cm" background-color="yellow"/> + <fo:table-column column-width="proportional-column-width(2)" background-color="blue"/> + <fo:table-column column-width="8cm" background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> +<fo:block space-before="12pt" space-after="6pt"> +The next table has width="70% + 1cm" and fixed lengths and the first table-column +has column-width="from-parent('width') div 3". +</fo:block> + <!-- table start --> + <fo:table border-collapse="collapse" width="70% + 1cm"> + <fo:table-column column-width="from-parent('width') div 3" background-color="yellow"/> + <fo:table-column background-color="blue"/> + <fo:table-column background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + +<fo:block space-before="12pt" space-after="6pt"> +The next table specifies inline-progression-dimension="15cm" instead of width. The +middle column has a fixed width; the other two have default width. +</fo:block> + <!-- table start --> + <fo:table border-collapse="collapse" + inline-progression-dimension="15cm"> + <fo:table-column background-color="yellow"/> + <fo:table-column column-width="3cm" background-color="blue"/> + <fo:table-column background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + +<fo:block space-before="12pt" space-after="6pt"> +The next table specifies neither width nor inline-progression-dimenion. +</fo:block> + <!-- table start --> + <fo:table table-layout="fixed" border-collapse="collapse"> + <fo:table-column background-color="yellow"/> + <fo:table-column column-width="3cm" background-color="blue"/> + <fo:table-column background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + +<fo:block space-before="12pt" space-after="6pt"> +The next table specifies inline-progression-dimenion.minimum="10cm" and +specifies a column width of 5cm on the middle column only.. +</fo:block> + <!-- table start --> + <fo:table table-layout="fixed" border-collapse="collapse" + inline-progression-dimension.minimum="10cm"> + <fo:table-column background-color="yellow"/> + <fo:table-column column-width="5cm" background-color="blue"/> + <fo:table-column background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> +<fo:block space-before="12pt" space-after="6pt"> +The next table specifies inline-progression-dimenion.minimum="10cm", +inline-progression-dimension.maximum="17cm and +specifies a column width of 5cm on the middle column only.. +</fo:block> + <!-- table start --> + <fo:table table-layout="fixed" border-collapse="collapse" + inline-progression-dimension.minimum="10cm" + inline-progression-dimension.maximum="17cm"> + <fo:table-column background-color="yellow"/> + <fo:table-column column-width="5cm" background-color="blue"/> + <fo:table-column background-color="green"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell display-align="before"><fo:block>Some text to make this cell +deeper than the others to check out the aliignment properties.</fo:block></fo:table-cell> + <fo:table-cell display-align="center"><fo:block>Centered</fo:block></fo:table-cell> + <fo:table-cell display-align="after"><fo:block>Bottom aligned</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/examples/fo/basic/textdeko.fo b/examples/fo/basic/textdeko.fo new file mode 100644 index 000000000..01bbe4293 --- /dev/null +++ b/examples/fo/basic/textdeko.fo @@ -0,0 +1,252 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- simple example for text-decoration --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + 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> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + 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="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <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" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-reference="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-reference="basicPSM"> + + <fo:flow flow-name="xsl-region-body"> + + <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="3pt"> + Simple example for text-decoration + </fo:block> + + <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" text-align="justify" space-after.optimum="10pt"> + The "text-decoration"-property describes decorations that are added to the text of an element. + If the property is specified for a block-level element, it should affect all inline-level descendants + of the element (does not work yet!). + If it is specified for (or affects) an inline-level + element, it affects all boxes generated by the element. + </fo:block> + + <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" space-after.optimum="13pt"> + Example: <fo:inline text-decoration="underline">underline</fo:inline> + </fo:block> + + <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" space-after.optimum="10pt"> + <fo:inline font-family="monospace"><![CDATA[<fo:inline text-decoration="underline">underline</fo:inline>]]></fo:inline> + </fo:block> + + <fo:block font-size="12pt" + font-family="serif" + line-height="15pt" + space-after.optimum="10pt" + text-align="start"> + This is simple test of the text-decoration<fo:inline text-decoration="underline">underline</fo:inline>. + </fo:block> + <fo:block font-size="22pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="10pt" + text-align="start"> + This is simple test with a <fo:inline text-decoration="underline">bigger</fo:inline> font-size. + </fo:block> + <fo:block font-size="12pt" + font-family="monospace" + line-height="15pt" + space-after.optimum="20pt" + text-align="start"> + This is simple test with a <fo:inline text-decoration="underline">monospaced</fo:inline> font. + + </fo:block> + + <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" text-align="justify" space-after.optimum="3pt"> + The following text decorations are defined in the CR: + </fo:block> + + <fo:list-block space-after.optimum="13pt"> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="none">none</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="underline">underline</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="overline">overline</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="line-through">line-through</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="blink">blink</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="no-underline">no-underline</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="no-overline">no-overline</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="no-line-through">no-line-through</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:inline text-decoration="no-blink">no-blink</fo:inline> + </fo:block> + </fo:list-item-body> + </fo:list-item> + + </fo:list-block> + + <fo:block font-size="12pt" space-after.optimum="3pt"> + <fo:inline text-decoration="underline overline">Combination</fo:inline> of property + values should also be possible, but does not work in FOP at the moment. + </fo:block> + + <fo:block font-size="12pt" space-after.optimum="13pt"> + <fo:inline font-family="monospace"><![CDATA[<fo:inline text-decoration="underline overline"> + Combination</fo:inline>]]></fo:inline> + </fo:block> + + + <fo:block space-after.optimum="13pt"> + And now <fo:inline text-decoration="underline">more than a word...</fo:inline> + </fo:block> + + <fo:block space-after.optimum="13pt" font-size="14pt" > + <fo:inline text-decoration="underline"> + This is a whole block wrapped in fo:inline with the property text-decoration="underline". + Some more Text to get at least two lines. + </fo:inline> + </fo:block> + + <fo:block font-size="22pt" + font-family="sans-serif" + line-height="22pt" + space-after.optimum="10pt" + text-align="start"> + This is simple test with a <fo:inline text-decoration="overline">bigger font-size</fo:inline>. + </fo:block> + <fo:block font-size="15pt" + font-family="monospace" + line-height="15pt" + space-after.optimum="10pt" + text-align="start"> + This is simple test with a <fo:inline text-decoration="line-through">monospaced font</fo:inline>. + </fo:block> + + <fo:block font-size="15pt" + line-height="15pt" + space-after.optimum="10pt" + text-align="start"> + What about underlining of whitespace only<fo:inline text-decoration="underline"> </fo:inline>? + </fo:block> + + + </fo:flow> + </fo:page-sequence> +</fo:root> |