diff options
author | Glenn Adams <gadams@apache.org> | 2016-03-06 06:14:41 +0000 |
---|---|---|
committer | Glenn Adams <gadams@apache.org> | 2016-03-06 06:14:41 +0000 |
commit | 57949ba0cfffa2dd5933a103c6ad867de9f1e7a0 (patch) | |
tree | cd1d8100a9135449635251820f39f272151005ac /fop/test/pdf | |
parent | c8cde713f54ca731f4a7f3bfaef8af9e8a1b9262 (diff) | |
download | xmlgraphics-fop-57949ba0cfffa2dd5933a103c6ad867de9f1e7a0.tar.gz xmlgraphics-fop-57949ba0cfffa2dd5933a103c6ad867de9f1e7a0.zip |
Configure maven build.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/maven@1733788 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop/test/pdf')
55 files changed, 1969 insertions, 0 deletions
diff --git a/fop/test/pdf/1.5/fop.xconf b/fop/test/pdf/1.5/fop.xconf new file mode 100644 index 000000000..ab8bc7cbf --- /dev/null +++ b/fop/test/pdf/1.5/fop.xconf @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fop version="1.0"> + <accessibility>true</accessibility> + <source-resolution>144</source-resolution> + <use-cache>false</use-cache> + <font-base>../../resources/fonts/ttf/</font-base> + <renderers> + <renderer mime="application/pdf"> + <version>1.5</version> + <filterList> + <value>null</value> + </filterList> + <filterList type="image"> + <value>flate</value> + <value>ascii-85</value> + </filterList> + <fonts> + <font embed-url="DejaVuLGCSerif.ttf"> + <font-triplet name="DejaVu" style="normal" weight="normal"/> + </font> + </fonts> + </renderer> + </renderers> +</fop> diff --git a/fop/test/pdf/1.5/test.fo b/fop/test/pdf/1.5/test.fo new file mode 100644 index 000000000..23e8405f3 --- /dev/null +++ b/fop/test/pdf/1.5/test.fo @@ -0,0 +1,207 @@ +<?xml version="1.0" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body column-count="2" margin-top="15pt"/> + <fo:region-before extent="12pt"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block font-size="8pt" text-align-last="justify">This is the page header<fo:leader/>Page + <fo:page-number/></fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-footnote-separator"> + <fo:block><fo:leader leader-length="100pt" leader-pattern="rule"/></fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>(There’s another page sequence <fo:wrapper color="blue"><fo:basic-link + internal-destination="second">below</fo:basic-link></fo:wrapper>.)</fo:block> + <fo:block font-family="sans-serif" font-weight="bold" space-before="1em" space-after="0.2em" + role="H1"><fo:block>About Apache FOP</fo:block></fo:block> + <fo:block>It is a print formatter driven by XSL formatting objects (XSL-FO) and an output + independent formatter<fo:footnote><fo:inline baseline-shift="super" + font-size="70%">1</fo:inline><fo:footnote-body><fo:block>See the <fo:wrapper + color="blue"><fo:basic-link + external-destination="http://xmlgraphics.apache.org/fop/">FOP + website</fo:basic-link></fo:wrapper> for more + information</fo:block></fo:footnote-body></fo:footnote>. FOP has a nice logo: + <fo:external-graphic src="../../resources/images/fop-logo-color-24bit.png" + inline-progression-dimension.maximum="100%" content-width="scale-to-fit" + fox:alt-text="FOP Logo"/></fo:block> + <fo:table space-before="10pt" space-after="10pt" width="100%" table-layout="fixed"> + <fo:table-header> + <fo:table-row> + <fo:table-cell border="2pt solid black" padding="2pt 2pt 0"> + <fo:block>Header 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid black" padding="2pt 2pt 0"> + <fo:block>Header 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + <fo:block span="all" border-top="1pt solid black" border-bottom="1pt solid black" + padding-before="2pt" padding-after="2pt">This fo:block element spans all the columns of the + document. This is intended to test the abilities of the text-to-speech program.</fo:block> + <fo:block>And now we are back to normal content flowing in two columns. Let’s start a numbered + list:</fo:block> + <fo:list-block provisional-distance-between-starts="15pt" provisional-label-separation="0mm" + keep-with-previous="auto"> + <fo:list-item keep-with-previous="always"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>1.</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:block>Line 1 of item 1</fo:block> + <fo:block>Line 2 of item 1</fo:block> + <fo:block>Line 3 of item 1</fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item keep-with-previous="always"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>2.</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:block>Line 1 of item 2</fo:block> + <fo:block>Line 2 of item 2</fo:block> + <fo:block>Line 3 of item 2</fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + <fo:block>And now we are going to see how a second page sequence is handled.</fo:block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="page"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block font-size="8pt" text-align-last="justify">This is the page header<fo:leader/>Page + <fo:page-number/></fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-footnote-separator"> + <fo:block><fo:leader leader-length="100pt" leader-pattern="rule"/></fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block id="second">Apache FOP (Formatting Objects Processor) is a print formatter driven by + XSL formatting objects (XSL-FO) and an output independent formatter<fo:footnote><fo:inline + baseline-shift="super" font-size="70%">1</fo:inline><fo:footnote-body><fo:block>See the + <fo:wrapper color="blue"><fo:basic-link + external-destination="http://xmlgraphics.apache.org/fop/">FOP + website</fo:basic-link></fo:wrapper> for more + information</fo:block></fo:footnote-body></fo:footnote>. It is a Java application that + reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + <fo:table space-before="10pt" space-after="10pt" width="100%" table-layout="fixed"> + <fo:table-header> + <fo:table-row> + <fo:table-cell border="2pt solid black" padding="2pt 2pt 0"> + <fo:block>Header 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid black" padding="2pt 2pt 0"> + <fo:block>Header 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:block language="fr" country="FR">Apache FOP (Formatting Objects Processor) est une + application de mise en page de documents respectant le standard XSL-FO. À partir d’un + document au format XSL-FO, cette application écrite en Java effectue une mise en page et + renvoie un document prêt pour impression.</fo:block> + <fo:block span="all" border-top="1pt solid black" border-bottom="1pt solid black" + padding-before="2pt" padding-after="2pt">This fo:block element spans all the columns of the + document. This is intended to test the abilities of the text-to-speech program.</fo:block> + <fo:block>And now we are back to normal content flowing in two columns. Let’s start a numbered + list:</fo:block> + <fo:list-block provisional-distance-between-starts="15pt" provisional-label-separation="0mm" + keep-with-previous="auto"> + <fo:list-item keep-with-previous="always"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>1.</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:block>Line 1 of item 1</fo:block> + <fo:block>Line 2 of item 1</fo:block> + <fo:block>Line 3 of item 1</fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item keep-with-previous="always"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>2.</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:block>Line 1 of item 2</fo:block> + <fo:block>Line 2 of item 2</fo:block> + <fo:block>Line 3 of item 2</fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + <fo:block>The end of the document has now been reached.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/1.5/test.pdf b/fop/test/pdf/1.5/test.pdf Binary files differnew file mode 100644 index 000000000..e937afd58 --- /dev/null +++ b/fop/test/pdf/1.5/test.pdf diff --git a/fop/test/pdf/accessibility/README b/fop/test/pdf/accessibility/README new file mode 100644 index 000000000..1d2e04361 --- /dev/null +++ b/fop/test/pdf/accessibility/README @@ -0,0 +1,41 @@ +This directory contains sample FO files for testing the accessibility features +of FOP. + +Every FO file in this directory has a corresponding PDF file in the pdf/ +sub-directory. The fop.xconf configuration file was used. + +The PDF files have been checked with Adobe Acrobat Professional 9, using both +the full accessibility checker and the read-aloud feature. The checker reports +no error /and/ the entire document can be read aloud. + + +!! DO NOT MODIFY THOSE FILES, NEITHER THE FO NOR THE PDF !! + + +... Or at least, know what you are doing +If the FO files are modified, the resulting PDFs must be checked again, both +with the checker and the read-aloud feature. (Sometimes the checker reports no +problem yet part or all of the document cannot be read aloud.) + +The purpose of this infrastructure is to be able to quickly re-test the +accessibility processing chain when any change has been made to it. The +configuration file disables the compression of the PDF streams, so it is +possible to compare a re-generated PDF with the original one by using a simple +diff tool. The files will not be identical because of the different creation +dates (and the ID key in the trailer), but apart from that there should be no +difference. + +The rationale is that using a diff tool is much quicker and less tedious than +running Acrobat's accessibility checker and read-aloud feature every time. + + +To re-generate the PDF files: + ../../fop -c fop.xconf text_1.fo pdf/text_1.new.pdf + diff pdf/text_1_painter.pdf pdf/text_1.new.pdf +Or, going through the intermediate format: + ../../fop -c fop.xconf text_1.fo -if application/pdf text_1_if.xml + ../../fop -c fop.xconf -ifin text_1_if.xml pdf/text_1.new.pdf + diff pdf/text_1.pdf pdf/text_1.new.pdf + + +$Id$ diff --git a/fop/test/pdf/accessibility/background-image_jpg_repeat.fo b/fop/test/pdf/accessibility/background-image_jpg_repeat.fo new file mode 100644 index 000000000..12af7d72a --- /dev/null +++ b/fop/test/pdf/accessibility/background-image_jpg_repeat.fo @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body background-image="../../resources/images/bgimg72dpi.jpg"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/background-image_jpg_single.fo b/fop/test/pdf/accessibility/background-image_jpg_single.fo new file mode 100644 index 000000000..1efd10deb --- /dev/null +++ b/fop/test/pdf/accessibility/background-image_jpg_single.fo @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body background-image="../../resources/images/bgimg72dpi.jpg" + background-repeat="no-repeat" background-position-horizontal="50%" + background-position-vertical="50%"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/background-image_png_repeat.fo b/fop/test/pdf/accessibility/background-image_png_repeat.fo new file mode 100644 index 000000000..9bbc3e47c --- /dev/null +++ b/fop/test/pdf/accessibility/background-image_png_repeat.fo @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body background-image="../../resources/images/bgimg72dpi.png"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/background-image_png_single.fo b/fop/test/pdf/accessibility/background-image_png_single.fo new file mode 100644 index 000000000..0cff427b6 --- /dev/null +++ b/fop/test/pdf/accessibility/background-image_png_single.fo @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body background-image="../../resources/images/fop-logo-color-24bit.png" + background-repeat="no-repeat" background-position-horizontal="50%" + background-position-vertical="50%"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/background-image_svg_repeat.fo b/fop/test/pdf/accessibility/background-image_svg_repeat.fo new file mode 100644 index 000000000..ba69947cc --- /dev/null +++ b/fop/test/pdf/accessibility/background-image_svg_repeat.fo @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body background-image="../../resources/images/rgb-circles.svg"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/background-image_svg_single.fo b/fop/test/pdf/accessibility/background-image_svg_single.fo new file mode 100644 index 000000000..efe91c65b --- /dev/null +++ b/fop/test/pdf/accessibility/background-image_svg_single.fo @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body background-image="../../resources/images/rgb-circles.svg" + background-repeat="no-repeat" background-position-horizontal="50%" + background-position-vertical="50%"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/complete.fo b/fop/test/pdf/accessibility/complete.fo new file mode 100644 index 000000000..23e8405f3 --- /dev/null +++ b/fop/test/pdf/accessibility/complete.fo @@ -0,0 +1,207 @@ +<?xml version="1.0" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body column-count="2" margin-top="15pt"/> + <fo:region-before extent="12pt"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block font-size="8pt" text-align-last="justify">This is the page header<fo:leader/>Page + <fo:page-number/></fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-footnote-separator"> + <fo:block><fo:leader leader-length="100pt" leader-pattern="rule"/></fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>(There’s another page sequence <fo:wrapper color="blue"><fo:basic-link + internal-destination="second">below</fo:basic-link></fo:wrapper>.)</fo:block> + <fo:block font-family="sans-serif" font-weight="bold" space-before="1em" space-after="0.2em" + role="H1"><fo:block>About Apache FOP</fo:block></fo:block> + <fo:block>It is a print formatter driven by XSL formatting objects (XSL-FO) and an output + independent formatter<fo:footnote><fo:inline baseline-shift="super" + font-size="70%">1</fo:inline><fo:footnote-body><fo:block>See the <fo:wrapper + color="blue"><fo:basic-link + external-destination="http://xmlgraphics.apache.org/fop/">FOP + website</fo:basic-link></fo:wrapper> for more + information</fo:block></fo:footnote-body></fo:footnote>. FOP has a nice logo: + <fo:external-graphic src="../../resources/images/fop-logo-color-24bit.png" + inline-progression-dimension.maximum="100%" content-width="scale-to-fit" + fox:alt-text="FOP Logo"/></fo:block> + <fo:table space-before="10pt" space-after="10pt" width="100%" table-layout="fixed"> + <fo:table-header> + <fo:table-row> + <fo:table-cell border="2pt solid black" padding="2pt 2pt 0"> + <fo:block>Header 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid black" padding="2pt 2pt 0"> + <fo:block>Header 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + <fo:block span="all" border-top="1pt solid black" border-bottom="1pt solid black" + padding-before="2pt" padding-after="2pt">This fo:block element spans all the columns of the + document. This is intended to test the abilities of the text-to-speech program.</fo:block> + <fo:block>And now we are back to normal content flowing in two columns. Let’s start a numbered + list:</fo:block> + <fo:list-block provisional-distance-between-starts="15pt" provisional-label-separation="0mm" + keep-with-previous="auto"> + <fo:list-item keep-with-previous="always"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>1.</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:block>Line 1 of item 1</fo:block> + <fo:block>Line 2 of item 1</fo:block> + <fo:block>Line 3 of item 1</fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item keep-with-previous="always"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>2.</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:block>Line 1 of item 2</fo:block> + <fo:block>Line 2 of item 2</fo:block> + <fo:block>Line 3 of item 2</fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + <fo:block>And now we are going to see how a second page sequence is handled.</fo:block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="page"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block font-size="8pt" text-align-last="justify">This is the page header<fo:leader/>Page + <fo:page-number/></fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-footnote-separator"> + <fo:block><fo:leader leader-length="100pt" leader-pattern="rule"/></fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block id="second">Apache FOP (Formatting Objects Processor) is a print formatter driven by + XSL formatting objects (XSL-FO) and an output independent formatter<fo:footnote><fo:inline + baseline-shift="super" font-size="70%">1</fo:inline><fo:footnote-body><fo:block>See the + <fo:wrapper color="blue"><fo:basic-link + external-destination="http://xmlgraphics.apache.org/fop/">FOP + website</fo:basic-link></fo:wrapper> for more + information</fo:block></fo:footnote-body></fo:footnote>. It is a Java application that + reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + <fo:table space-before="10pt" space-after="10pt" width="100%" table-layout="fixed"> + <fo:table-header> + <fo:table-row> + <fo:table-cell border="2pt solid black" padding="2pt 2pt 0"> + <fo:block>Header 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid black" padding="2pt 2pt 0"> + <fo:block>Header 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding="2pt 2pt 0"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:block language="fr" country="FR">Apache FOP (Formatting Objects Processor) est une + application de mise en page de documents respectant le standard XSL-FO. À partir d’un + document au format XSL-FO, cette application écrite en Java effectue une mise en page et + renvoie un document prêt pour impression.</fo:block> + <fo:block span="all" border-top="1pt solid black" border-bottom="1pt solid black" + padding-before="2pt" padding-after="2pt">This fo:block element spans all the columns of the + document. This is intended to test the abilities of the text-to-speech program.</fo:block> + <fo:block>And now we are back to normal content flowing in two columns. Let’s start a numbered + list:</fo:block> + <fo:list-block provisional-distance-between-starts="15pt" provisional-label-separation="0mm" + keep-with-previous="auto"> + <fo:list-item keep-with-previous="always"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>1.</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:block>Line 1 of item 1</fo:block> + <fo:block>Line 2 of item 1</fo:block> + <fo:block>Line 3 of item 1</fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item keep-with-previous="always"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>2.</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <fo:block>Line 1 of item 2</fo:block> + <fo:block>Line 2 of item 2</fo:block> + <fo:block>Line 3 of item 2</fo:block> + </fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + <fo:block>The end of the document has now been reached.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/fop.xconf b/fop/test/pdf/accessibility/fop.xconf new file mode 100644 index 000000000..24346a16a --- /dev/null +++ b/fop/test/pdf/accessibility/fop.xconf @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fop version="1.0"> + <accessibility>true</accessibility> + <source-resolution>144</source-resolution> + <use-cache>false</use-cache> + <font-base>../../resources/fonts/ttf/</font-base> + <renderers> + <renderer mime="application/pdf"> + <version>1.4</version> + <filterList> + <value>null</value> + </filterList> + <filterList type="image"> + <value>flate</value> + <value>ascii-85</value> + </filterList> + <fonts> + <font embed-url="DejaVuLGCSerif.ttf"> + <font-triplet name="DejaVu" style="normal" weight="normal"/> + </font> + </fonts> + </renderer> + </renderers> +</fop> diff --git a/fop/test/pdf/accessibility/hyphenation.fo b/fop/test/pdf/accessibility/hyphenation.fo new file mode 100644 index 000000000..28a3b76df --- /dev/null +++ b/fop/test/pdf/accessibility/hyphenation.fo @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xml:lang="en-US"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="170pt" page-width="220pt" margin="10pt"> + <fo:region-body display-align="center"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page" hyphenate="true"> + <fo:flow flow-name="xsl-region-body" text-align="justify"> + <fo:block-container width="140pt" start-indent="30pt"> + <fo:block start-indent="0">Hyphenated text. Hyphenated text. Hyphenated text. Hyphenated + text. Hyphenated text.</fo:block> + </fo:block-container> + <fo:block-container width="140pt" space-before="10pt" start-indent="30pt"> + <fo:block start-indent="0">Hyphenated text with ‘special’ character. Hyphenated text with + ‘special’ character.</fo:block> + </fo:block-container> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/image_jpg.fo b/fop/test/pdf/accessibility/image_jpg.fo new file mode 100644 index 000000000..2a2b60076 --- /dev/null +++ b/fop/test/pdf/accessibility/image_jpg.fo @@ -0,0 +1,35 @@ +<?xml version="1.0" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>This document contains an image in the JPEG format: <fo:external-graphic + src="../../resources/images/cmyk.jpg" + inline-progression-dimension.maximum="100%" content-width="scale-to-fit" + fox:alt-text="CMYK colours"/>. Here is the end of the text.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/image_png.fo b/fop/test/pdf/accessibility/image_png.fo new file mode 100644 index 000000000..52ee80ac5 --- /dev/null +++ b/fop/test/pdf/accessibility/image_png.fo @@ -0,0 +1,35 @@ +<?xml version="1.0" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>This document contains an image in the PNG format: <fo:external-graphic + src="../../resources/images/fop-logo-color-24bit.png" + inline-progression-dimension.maximum="100%" content-width="scale-to-fit" + fox:alt-text="FOP Logo"/>. Here is the end of the text.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/image_svg.fo b/fop/test/pdf/accessibility/image_svg.fo new file mode 100644 index 000000000..96cfedee3 --- /dev/null +++ b/fop/test/pdf/accessibility/image_svg.fo @@ -0,0 +1,45 @@ +<?xml version="1.0" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>This document contains an image in the SVG format: <fo:external-graphic + src="../../resources/images/circles.svg" + inline-progression-dimension.maximum="75pt" content-width="scale-to-fit" + fox:alt-text="Nice circles"/>. And here is the same image as an instream-foreign-object: + <fo:instream-foreign-object inline-progression-dimension.maximum="75pt" + content-width="scale-down-to-fit" fox:alt-text="The same nice circles"> +<svg xmlns="http://www.w3.org/2000/svg" width="12cm" height="12cm"> + <g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;"> + <circle cx="6cm" cy="2cm" r="100" style="fill:red;" transform="translate(0,50)" /> + <circle cx="6cm" cy="2cm" r="100" style="fill:blue;" transform="translate(70,150)" /> + <circle cx="6cm" cy="2cm" r="100" style="fill:green;" transform="translate(-70,150)"/> + </g> +</svg> + </fo:instream-foreign-object>.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/image_wmf.fo b/fop/test/pdf/accessibility/image_wmf.fo new file mode 100644 index 000000000..43112dba1 --- /dev/null +++ b/fop/test/pdf/accessibility/image_wmf.fo @@ -0,0 +1,35 @@ +<?xml version="1.0" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="320pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>This document contains an image in the WMF format: <fo:external-graphic + src="../../resources/images/testChart.wmf" + inline-progression-dimension.maximum="100%" content-width="scale-to-fit" + fox:alt-text="Metafile Companion Test Chart"/> Here is the end of the text.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/language.fo b/fop/test/pdf/accessibility/language.fo new file mode 100644 index 000000000..8dfb2694a --- /dev/null +++ b/fop/test/pdf/accessibility/language.fo @@ -0,0 +1,30 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" + font-family="sans-serif"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="170pt" page-width="220pt" margin="10pt"> + <fo:region-body display-align="center"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page" language="en" country="GB"> + <fo:flow flow-name="xsl-region-body" line-height="10pt" font-size="8pt" space-before="5pt" + space-after="5pt"> + <fo:block>This block of text is written in the default language of the page sequence, which is + British English.</fo:block> + <fo:block language="fr" country="FR" space-before="inherit" space-after="inherit">Ce text est + écrit dans une autre langue, en l’occurence le français de France. + <fo:block language="en" country="US" space-before="inherit" start-indent="1em" + space-after="inherit">However, this block of French text encloses a block of American + English. + <fo:block space-before="inherit" start-indent="2em" space-after="inherit" language="en" + country="US">The structure element corresponding to this block should have no language + set as it is the same as on the parent block.</fo:block></fo:block> + Maintenant on revient au français.</fo:block> + <fo:block space-before="inherit">And now we are back to the English language, with a + <fo:character character="F" language="fr" country="none" color="blue"/>rench + character.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/leader.fo b/fop/test/pdf/accessibility/leader.fo new file mode 100644 index 000000000..4b395cc69 --- /dev/null +++ b/fop/test/pdf/accessibility/leader.fo @@ -0,0 +1,38 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify" + text-align-last="justify"> + <fo:block>This is a text followed by a leader with leader-pattern="use-content", the + content being text:<fo:leader leader-pattern="use-content"><fo:inline> • + </fo:inline></fo:leader>1</fo:block> + <fo:block space-before="10pt">This is a text followed by a leader with + leader-pattern="use-content", the content being images:<fo:leader + leader-pattern="use-content"><fo:external-graphic + src="../../resources/images/list-item.png"/></fo:leader>1</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/links.fo b/fop/test/pdf/accessibility/links.fo new file mode 100644 index 000000000..36250e332 --- /dev/null +++ b/fop/test/pdf/accessibility/links.fo @@ -0,0 +1,41 @@ +<?xml version="1.0" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>This is a <fo:wrapper color="blue"><fo:basic-link + internal-destination="FOP">link</fo:basic-link></fo:wrapper> to the next + paragraph.</fo:block> + <fo:block id="FOP">Apache FOP (Formatting Objects Processor) is a print formatter driven by + XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java + application that reads a formatting object (FO) tree and renders the resulting pages to a + specified output.</fo:block> + <fo:block>For more information, see the <fo:wrapper color="blue"><fo:basic-link + external-destination="http://xmlgraphics.apache.org/fop/">FOP + website</fo:basic-link></fo:wrapper>.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/markers.fo b/fop/test/pdf/accessibility/markers.fo new file mode 100644 index 000000000..67dbfc3d4 --- /dev/null +++ b/fop/test/pdf/accessibility/markers.fo @@ -0,0 +1,169 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xml:lang="en-GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="200pt" page-width="280pt" margin="10pt"> + <fo:region-body/> + <fo:region-after extent="100pt" display-align="after"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:static-content flow-name="xsl-region-after" line-height="10pt" font-size="8pt"> + <fo:block>Retrieving the marker:</fo:block> + <fo:retrieve-marker retrieve-class-name="marker"/> + <fo:block>Marker retrieved.</fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block><fo:marker marker-class-name="marker"> + <fo:table width="100%" table-layout="fixed"> + <fo:table-header> + <fo:table-row> + <fo:table-cell border="1pt solid black"> + <fo:block-container> + <fo:block>Inside a block-container.</fo:block> + </fo:block-container> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>A character: <fo:character character="c" color="blue"/>.</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block text-align="center"><fo:instream-foreign-object fox:alt-text="Nice + circles." width="30pt" overflow="hidden" display-align="center" + content-width="30pt"> + <svg xmlns="http://www.w3.org/2000/svg" width="319" height="286.6"> + <g style="fill-opacity:0.7; stroke:black; stroke-width:3" + transform="translate(0, 286.6) scale(1, -1) translate(100, 100)"> + <circle cx="50" cy="86.6" r="80" style="fill:red;"/> + <circle cx="0" cy="0" r="80" style="fill:green;"/> + <circle cx="100" cy="0" r="80" style="fill:blue;"/> + </g> + </svg> + </fo:instream-foreign-object></fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block text-align-last="justify">Lead<fo:leader leader-pattern="dots" + leader-length.minimum="0" leader-length.optimum="100%"/>er.</fo:block> + <fo:block>Page <fo:page-number/>.</fo:block> + <fo:block-container absolute-position="absolute" width="35pt" height="10pt" top="20pt" + right="2pt" color="purple" text-align="right"> + <fo:block>Absolute.</fo:block> + </fo:block-container> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="1pt solid black"> + <fo:block>1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>1.2</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>1.3</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>1.4</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black"> + <fo:block>2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>2.2</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>2.3</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>2.4</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table></fo:marker>Text in the region-body.</fo:block> + </fo:flow> + </fo:page-sequence> + + <fo:page-sequence master-reference="page"> + <fo:static-content flow-name="xsl-region-after" line-height="10pt" font-size="8pt" + role="artifact"> + <fo:block>This whole page footer should neither appear in the structure tree nor be read out + loud.</fo:block> + <fo:block>Retrieving the marker:</fo:block> + <fo:retrieve-marker retrieve-class-name="marker"/> + <fo:block>Marker retrieved.</fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block><fo:marker marker-class-name="marker"> + <fo:table width="100%" table-layout="fixed"> + <fo:table-header> + <fo:table-row> + <fo:table-cell border="1pt solid black"> + <fo:block-container> + <fo:block>Inside a block-container.</fo:block> + </fo:block-container> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>A character: <fo:character character="c" color="blue"/>.</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block text-align="center"><fo:instream-foreign-object fox:alt-text="Nice + circles." width="30pt" overflow="hidden" display-align="center" + content-width="30pt"> + <svg xmlns="http://www.w3.org/2000/svg" width="319" height="286.6"> + <g style="fill-opacity:0.7; stroke:black; stroke-width:3" + transform="translate(0, 286.6) scale(1, -1) translate(100, 100)"> + <circle cx="50" cy="86.6" r="80" style="fill:red;"/> + <circle cx="0" cy="0" r="80" style="fill:green;"/> + <circle cx="100" cy="0" r="80" style="fill:blue;"/> + </g> + </svg> + </fo:instream-foreign-object></fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block text-align-last="justify">Lead<fo:leader leader-pattern="dots" + leader-length.minimum="0" leader-length.optimum="100%"/>er.</fo:block> + <fo:block>Page <fo:page-number/>.</fo:block> + <fo:block-container absolute-position="absolute" width="35pt" height="10pt" top="20pt" + right="2pt" color="purple" text-align="right"> + <fo:block>Absolute.</fo:block> + </fo:block-container> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="1pt solid black"> + <fo:block>1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>1.2</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>1.3</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>1.4</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black"> + <fo:block>2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>2.2</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>2.3</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>2.4</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table></fo:marker>Text in the region-body.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/pdf/background-image_jpg_repeat.pdf b/fop/test/pdf/accessibility/pdf/background-image_jpg_repeat.pdf Binary files differnew file mode 100644 index 000000000..4c2fe4687 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/background-image_jpg_repeat.pdf diff --git a/fop/test/pdf/accessibility/pdf/background-image_jpg_single.pdf b/fop/test/pdf/accessibility/pdf/background-image_jpg_single.pdf Binary files differnew file mode 100644 index 000000000..74b17c337 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/background-image_jpg_single.pdf diff --git a/fop/test/pdf/accessibility/pdf/background-image_png_repeat.pdf b/fop/test/pdf/accessibility/pdf/background-image_png_repeat.pdf Binary files differnew file mode 100644 index 000000000..f69e373bc --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/background-image_png_repeat.pdf diff --git a/fop/test/pdf/accessibility/pdf/background-image_png_single.pdf b/fop/test/pdf/accessibility/pdf/background-image_png_single.pdf Binary files differnew file mode 100644 index 000000000..cdba6192e --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/background-image_png_single.pdf diff --git a/fop/test/pdf/accessibility/pdf/background-image_svg_repeat.pdf b/fop/test/pdf/accessibility/pdf/background-image_svg_repeat.pdf Binary files differnew file mode 100644 index 000000000..ed74244b3 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/background-image_svg_repeat.pdf diff --git a/fop/test/pdf/accessibility/pdf/background-image_svg_single.pdf b/fop/test/pdf/accessibility/pdf/background-image_svg_single.pdf Binary files differnew file mode 100644 index 000000000..d2245e349 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/background-image_svg_single.pdf diff --git a/fop/test/pdf/accessibility/pdf/complete.pdf b/fop/test/pdf/accessibility/pdf/complete.pdf Binary files differnew file mode 100644 index 000000000..844106f23 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/complete.pdf diff --git a/fop/test/pdf/accessibility/pdf/hyphenation.pdf b/fop/test/pdf/accessibility/pdf/hyphenation.pdf Binary files differnew file mode 100644 index 000000000..401fbf356 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/hyphenation.pdf diff --git a/fop/test/pdf/accessibility/pdf/image_jpg.pdf b/fop/test/pdf/accessibility/pdf/image_jpg.pdf Binary files differnew file mode 100644 index 000000000..76f5509c8 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/image_jpg.pdf diff --git a/fop/test/pdf/accessibility/pdf/image_png.pdf b/fop/test/pdf/accessibility/pdf/image_png.pdf Binary files differnew file mode 100644 index 000000000..0a5641aaa --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/image_png.pdf diff --git a/fop/test/pdf/accessibility/pdf/image_svg.pdf b/fop/test/pdf/accessibility/pdf/image_svg.pdf Binary files differnew file mode 100644 index 000000000..eaf6d56c4 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/image_svg.pdf diff --git a/fop/test/pdf/accessibility/pdf/image_wmf.pdf b/fop/test/pdf/accessibility/pdf/image_wmf.pdf Binary files differnew file mode 100644 index 000000000..819f385a6 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/image_wmf.pdf diff --git a/fop/test/pdf/accessibility/pdf/language.pdf b/fop/test/pdf/accessibility/pdf/language.pdf Binary files differnew file mode 100644 index 000000000..e32f4f7e9 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/language.pdf diff --git a/fop/test/pdf/accessibility/pdf/leader.pdf b/fop/test/pdf/accessibility/pdf/leader.pdf Binary files differnew file mode 100644 index 000000000..869a47d76 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/leader.pdf diff --git a/fop/test/pdf/accessibility/pdf/links.pdf b/fop/test/pdf/accessibility/pdf/links.pdf Binary files differnew file mode 100644 index 000000000..5c63a2574 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/links.pdf diff --git a/fop/test/pdf/accessibility/pdf/markers.pdf b/fop/test/pdf/accessibility/pdf/markers.pdf Binary files differnew file mode 100644 index 000000000..752fbd10d --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/markers.pdf diff --git a/fop/test/pdf/accessibility/pdf/role.pdf b/fop/test/pdf/accessibility/pdf/role.pdf Binary files differnew file mode 100644 index 000000000..a91e8b983 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/role.pdf diff --git a/fop/test/pdf/accessibility/pdf/role_non-standard.pdf b/fop/test/pdf/accessibility/pdf/role_non-standard.pdf Binary files differnew file mode 100644 index 000000000..c7a55233c --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/role_non-standard.pdf diff --git a/fop/test/pdf/accessibility/pdf/side-regions.pdf b/fop/test/pdf/accessibility/pdf/side-regions.pdf Binary files differnew file mode 100644 index 000000000..650e962b3 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/side-regions.pdf diff --git a/fop/test/pdf/accessibility/pdf/table_row-col-span.pdf b/fop/test/pdf/accessibility/pdf/table_row-col-span.pdf Binary files differnew file mode 100644 index 000000000..9a05c1892 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/table_row-col-span.pdf diff --git a/fop/test/pdf/accessibility/pdf/text_1.pdf b/fop/test/pdf/accessibility/pdf/text_1.pdf Binary files differnew file mode 100644 index 000000000..71b32f80c --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/text_1.pdf diff --git a/fop/test/pdf/accessibility/pdf/text_2.pdf b/fop/test/pdf/accessibility/pdf/text_2.pdf Binary files differnew file mode 100644 index 000000000..ac1662659 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/text_2.pdf diff --git a/fop/test/pdf/accessibility/pdf/text_font-embedding.pdf b/fop/test/pdf/accessibility/pdf/text_font-embedding.pdf Binary files differnew file mode 100644 index 000000000..d724af9e9 --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/text_font-embedding.pdf diff --git a/fop/test/pdf/accessibility/pdf/th_scope.pdf b/fop/test/pdf/accessibility/pdf/th_scope.pdf Binary files differnew file mode 100644 index 000000000..68a98987b --- /dev/null +++ b/fop/test/pdf/accessibility/pdf/th_scope.pdf diff --git a/fop/test/pdf/accessibility/role.fo b/fop/test/pdf/accessibility/role.fo new file mode 100644 index 000000000..b94c6ab67 --- /dev/null +++ b/fop/test/pdf/accessibility/role.fo @@ -0,0 +1,130 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="240pt" page-width="320pt" margin="10pt" margin-bottom="8pt"> + <fo:region-body margin-bottom="20pt"/> + <fo:region-after extent="10pt"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page" language="en" country="GB" role="Art"> + <fo:static-content flow-name="xsl-region-after" role="artifact" font-size="8pt"> + <fo:block text-align="center"><fo:page-number/></fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body" role="NonStruct" hyphenate="true" + font-family="sans-serif"> + <fo:block role="H1" font-weight="bold" font-size="150%" + space-before.minimum="1.5em" + space-before.optimum="2em" + space-before.maximum="3em" + space-before.precedence="1000" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="1000">Title 1: To Start With</fo:block> + <fo:block role="H2" font-weight="bold" font-size="120%" + space-before.minimum="1.2em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-before.precedence="900" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="900">Title 2: A Sub-Title</fo:block> + <fo:block text-align="justify">Apache FOP (Formatting Objects Processor) is a print formatter + driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java + application that reads a formatting object (FO) tree and renders the resulting pages to a + specified output.</fo:block> + <fo:block role="H2" font-weight="bold" font-size="120%" + space-before.minimum="1.2em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-before.precedence="900" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="900">Title 2: Another Sub-Title</fo:block> + <fo:block text-align="justify">Apache FOP (Formatting Objects Processor) is a print formatter + driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java + application that reads a formatting object (FO) tree and renders the resulting pages to a + specified output.</fo:block> + <fo:block role="H1" font-weight="bold" font-size="150%" + space-before.minimum="1.5em" + space-before.optimum="2em" + space-before.maximum="3em" + space-before.precedence="1000" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="1000">Title 1: Second Title</fo:block> + <fo:block role="H2" font-weight="bold" font-size="120%" + space-before.minimum="1.2em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-before.precedence="900" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="900">Title 2: A Sample Table</fo:block> + <fo:block>See data below:</fo:block> + <fo:table table-layout="fixed" width="70%" start-indent="15%" border="0.5pt solid black"> + <fo:table-header start-indent="0" font-weight="bold"> + <fo:table-row> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Header 1</fo:block> + </fo:table-cell> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Header 2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-footer start-indent="0" font-weight="bold"> + <fo:table-row> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Footer 1</fo:block> + </fo:table-cell> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Footer 2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-footer> + <fo:table-body start-indent="0"> + <fo:table-row> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:block text-align="justify" space-before="0.5em">That’s all folks.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/role_non-standard.fo b/fop/test/pdf/accessibility/role_non-standard.fo new file mode 100644 index 000000000..d3e1a9852 --- /dev/null +++ b/fop/test/pdf/accessibility/role_non-standard.fo @@ -0,0 +1,125 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" font-family="sans-serif"> + <fo:block role="H1" font-weight="bold" font-size="150%" + space-before.minimum="1.5em" + space-before.optimum="2em" + space-before.maximum="3em" + space-before.precedence="1000" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="1000">Title 1: To Start With</fo:block> + <fo:block role="Header2" font-weight="bold" font-size="120%" + space-before.minimum="1.2em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-before.precedence="900" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="900">A Sub-Title With a Non-Standard Role</fo:block> + <fo:block text-align="justify">Apache FOP (Formatting Objects Processor) is a print formatter + driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java + application that reads a formatting object (FO) tree and renders the resulting pages to a + specified output.</fo:block> + <fo:block role="H2" font-weight="bold" font-size="120%" + space-before.minimum="1.2em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-before.precedence="900" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="900">Title 2: Another Sub-Title</fo:block> + <fo:block text-align="justify">Apache FOP (Formatting Objects Processor) is a print formatter + driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java + application that reads a formatting object (FO) tree and renders the resulting pages to a + specified output.</fo:block> + <fo:block role="H1" font-weight="bold" font-size="150%" + space-before.minimum="1.5em" + space-before.optimum="2em" + space-before.maximum="3em" + space-before.precedence="1000" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="1000">Title 1: Second Title</fo:block> + <fo:block role="H2" font-weight="bold" font-size="120%" + space-before.minimum="1.2em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-before.precedence="900" + space-after.minimum="0.2em" + space-after.optimum="0.2em" + space-after.maximum="0.5em" + space-after.precedence="900">Title 2: A Sample Table</fo:block> + <fo:block>See data below:</fo:block> + <fo:table table-layout="fixed" width="70%" start-indent="15%" border="0.5pt solid black"> + <fo:table-header start-indent="0" font-weight="bold" role="TableHeader"> + <fo:table-row> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Header 1</fo:block> + </fo:table-cell> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Header 2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-footer start-indent="0" font-weight="bold"> + <fo:table-row> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Footer 1</fo:block> + </fo:table-cell> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Footer 2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-footer> + <fo:table-body start-indent="0"> + <fo:table-row> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="0.5pt solid black" padding="2pt"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:block text-align="justify" space-before="0.5em">That’s all folks.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/side-regions.fo b/fop/test/pdf/accessibility/side-regions.fo new file mode 100644 index 000000000..8a0fba2ec --- /dev/null +++ b/fop/test/pdf/accessibility/side-regions.fo @@ -0,0 +1,181 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="first-page" + page-height="100pt" page-width="150pt"> + <fo:region-body margin="12pt" display-align="center" background-color="#FFF0F0"/> + <fo:region-before region-name="first-page-before" extent="10pt" precedence="true" + display-align="after"/> + <fo:region-after region-name="first-page-after" extent="10pt" precedence="true"/> + <fo:region-start region-name="first-page-start" extent="10pt" reference-orientation="90" + display-align="after"/> + <fo:region-end region-name="first-page-end" extent="10pt" reference-orientation="-90" + display-align="after"/> + </fo:simple-page-master> + <fo:simple-page-master master-name="odd-page" + page-height="100pt" page-width="150pt"> + <fo:region-body margin="12pt" display-align="center" background-color="#FFFFF0"/> + <fo:region-before region-name="odd-page-before" extent="10pt" precedence="true" + display-align="after"/> + <fo:region-after region-name="odd-page-after" extent="10pt" precedence="true"/> + <fo:region-start region-name="odd-page-start" extent="10pt" reference-orientation="90" + display-align="after"/> + <fo:region-end region-name="odd-page-end" extent="10pt" reference-orientation="-90" + display-align="after"/> + </fo:simple-page-master> + <fo:simple-page-master master-name="even-page" + page-height="100pt" page-width="150pt"> + <fo:region-body margin="12pt" display-align="center" background-color="#F0FFF0"/> + <fo:region-before region-name="even-page-before" extent="10pt" precedence="true" + display-align="after"/> + <fo:region-after region-name="even-page-after" extent="10pt" precedence="true"/> + <fo:region-start region-name="even-page-start" extent="10pt" reference-orientation="90" + display-align="after"/> + <fo:region-end region-name="even-page-end" extent="10pt" reference-orientation="-90" + display-align="after"/> + </fo:simple-page-master> + <fo:simple-page-master master-name="blank-page" + page-height="100pt" page-width="150pt"> + <fo:region-body margin="12pt" display-align="center" background-color="#F0F0F0"/> + <fo:region-before region-name="blank-page-before" extent="10pt" precedence="true" + display-align="after"/> + <fo:region-after region-name="blank-page-after" extent="10pt" precedence="true"/> + <fo:region-start region-name="blank-page-start" extent="10pt" reference-orientation="90" + display-align="after"/> + <fo:region-end region-name="blank-page-end" extent="10pt" reference-orientation="-90" + display-align="after"/> + </fo:simple-page-master> + <fo:simple-page-master master-name="last-page" + page-height="100pt" page-width="150pt"> + <fo:region-body margin="45pt 12pt" display-align="center" background-color="#F0F0FF"/> + <fo:region-before region-name="last-page-before" extent="10pt" precedence="true" + display-align="after"/> + <fo:region-after region-name="last-page-after" extent="10pt" precedence="true"/> + <fo:region-start region-name="last-page-start" extent="10pt" reference-orientation="90" + display-align="after"/> + <fo:region-end region-name="last-page-end" extent="10pt" reference-orientation="-90" + display-align="after"/> + </fo:simple-page-master> + <fo:page-sequence-master master-name="pages"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference page-position="first" master-reference="first-page"/> + <fo:conditional-page-master-reference page-position="last" master-reference="last-page"/> + <fo:conditional-page-master-reference blank-or-not-blank="blank" + master-reference="blank-page"/> + <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-page"/> + <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-page"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="pages" force-page-count="even" font-size="4pt" + text-align="center"> + + <fo:static-content flow-name="first-page-before"> + <fo:block start-indent="12pt" end-indent="12pt" border-bottom="0.5pt solid red" + padding-bottom="0.5pt">First Page Before.</fo:block> + </fo:static-content> + <fo:static-content flow-name="first-page-after"> + <fo:block start-indent="12pt" end-indent="12pt" border-top="0.5pt solid red" + padding-top="0.5pt">First Page After.</fo:block> + </fo:static-content> + <fo:static-content flow-name="first-page-start"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid red" + padding-bottom="0.5pt">First Page Start.</fo:block> + </fo:static-content> + <fo:static-content flow-name="first-page-end"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid red" + padding-bottom="0.5pt">First Page End.</fo:block> + </fo:static-content> + + <fo:static-content flow-name="odd-page-after"> + <fo:block start-indent="12pt" end-indent="12pt" border-top="0.5pt solid orange" + padding-top="0.5pt">Odd Page After.</fo:block> + </fo:static-content> + <fo:static-content flow-name="odd-page-end"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid orange" + padding-bottom="0.5pt">Odd Page End.</fo:block> + </fo:static-content> + <fo:static-content flow-name="odd-page-start"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid orange" + padding-bottom="0.5pt">Odd Page Start.</fo:block> + </fo:static-content> + <fo:static-content flow-name="odd-page-before"> + <fo:block start-indent="12pt" end-indent="12pt" border-bottom="0.5pt solid orange" + padding-bottom="0.5pt">Odd Page Before.</fo:block> + </fo:static-content> + + <fo:static-content flow-name="even-page-end"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid green" + padding-bottom="0.5pt">Even Page End.</fo:block> + </fo:static-content> + <fo:static-content flow-name="even-page-start"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid green" + padding-bottom="0.5pt">Even Page Start.</fo:block> + </fo:static-content> + <fo:static-content flow-name="even-page-after"> + <fo:block start-indent="12pt" end-indent="12pt" border-top="0.5pt solid green" + padding-top="0.5pt">Even Page After.</fo:block> + </fo:static-content> + <fo:static-content flow-name="even-page-before"> + <fo:block start-indent="12pt" end-indent="12pt" border-bottom="0.5pt solid green" + padding-bottom="0.5pt">Even Page Before.</fo:block> + </fo:static-content> + + <fo:static-content flow-name="blank-page-start"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid black" + padding-bottom="0.5pt">Blank Page Start.</fo:block> + </fo:static-content> + <fo:static-content flow-name="blank-page-after"> + <fo:block start-indent="12pt" end-indent="12pt" border-top="0.5pt solid black" + padding-top="0.5pt">Blank Page After.</fo:block> + </fo:static-content> + <fo:static-content flow-name="blank-page-before"> + <fo:block start-indent="12pt" end-indent="12pt" border-bottom="0.5pt solid black" + padding-bottom="0.5pt">Blank Page Before.</fo:block> + </fo:static-content> + <fo:static-content flow-name="blank-page-end"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid black" + padding-bottom="0.5pt">Blank Page End.</fo:block> + </fo:static-content> + + <fo:static-content flow-name="last-page-before"> + <fo:block start-indent="12pt" end-indent="12pt" border-bottom="0.5pt solid blue" + padding-bottom="0.5pt">Last Page Before.</fo:block> + </fo:static-content> + <fo:static-content flow-name="last-page-end"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid blue" + padding-bottom="0.5pt">Last Page End.</fo:block> + </fo:static-content> + <fo:static-content flow-name="last-page-after"> + <fo:block start-indent="12pt" end-indent="12pt" border-top="0.5pt solid blue" + padding-top="0.5pt">Last Page After.</fo:block> + </fo:static-content> + <fo:static-content flow-name="last-page-start"> + <fo:block start-indent="2pt" end-indent="2pt" border-bottom="0.5pt solid blue" + padding-bottom="0.5pt">Last Page Start.</fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-footnote-separator"> + <fo:block> + <fo:leader leader-pattern="rule" leader-length="40%" rule-thickness="0.5pt"/> + </fo:block> + </fo:static-content> + + <fo:flow flow-name="xsl-region-body" font-size="8pt" line-height="10pt"> + <fo:block>Apache™ FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter.</fo:block> + <fo:block break-before="page">It is an application<fo:footnote><fo:inline>*</fo:inline> + <fo:footnote-body><fo:block font-size="80%">* written in + Java</fo:block></fo:footnote-body></fo:footnote> that reads a formatting object (FO) + tree and renders the resulting pages to a specified output.</fo:block> + <fo:block break-before="page">The FOP project is part of the Apache Software Foundation, which + is a wider community of users and developers of open source projects.</fo:block> + <fo:block break-before="page">Apache™ FOP (Formatting Objects Processor) is a print formatter + driven by XSL formatting objects (XSL-FO) and an output independent formatter.</fo:block> + <fo:block break-before="page">It is a Java application that reads a formatting object (FO) + tree and renders the resulting pages to a specified output.</fo:block> + <fo:block break-before="page">The FOP project is part of the Apache Software Foundation, which + is a wider community of users and developers of open source projects.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/table_row-col-span.fo b/fop/test/pdf/accessibility/table_row-col-span.fo new file mode 100644 index 000000000..1d28d4406 --- /dev/null +++ b/fop/test/pdf/accessibility/table_row-col-span.fo @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="utf-8"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" page-height="320pt" page-width="420pt" margin="10pt"> + <fo:region-body display-align="center"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:table table-layout="fixed" width="100%" border-collapse="separate" + border-separation="4pt"> + <fo:table-body> + <fo:table-row> + <fo:table-cell number-columns-spanned="2" background-color="orange" padding-left="1pt"> + <fo:block>Cells 1.1 and 1.2.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 1.3.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 1.4.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Cell 2.1.</fo:block> + </fo:table-cell> + <fo:table-cell number-columns-spanned="2" background-color="orange" padding-left="1pt"> + <fo:block>Cells 2.2 and 2.3.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 2.4.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Cell 3.1.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 3.2.</fo:block> + </fo:table-cell> + <fo:table-cell number-columns-spanned="2" background-color="orange" padding-left="1pt"> + <fo:block>Cells 3.3 and 3.4.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell number-columns-spanned="3" background-color="orange" padding-left="1pt"> + <fo:block>Cells 4.1, 4.2 and 4.3.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 4.4.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell number-columns-spanned="4" background-color="orange" padding-left="1pt"> + <fo:block>Cells 5.1, 5.2, 5.3 and 5.4.</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + + <fo:table table-layout="fixed" width="100%" space-before="40pt" border-collapse="separate" + border-separation="4pt"> + <fo:table-body> + <fo:table-row> + <fo:table-cell number-rows-spanned="2" background-color="orange" padding-left="1pt"> + <fo:block>Cells 1.1</fo:block> + <fo:block>and 2.1.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 1.2.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 1.3.</fo:block> + </fo:table-cell> + <fo:table-cell number-rows-spanned="4" background-color="orange" padding-left="1pt"> + <fo:block>Cells 1.4,</fo:block> + <fo:block>2.4,</fo:block> + <fo:block>3.4</fo:block> + <fo:block>and 4.4.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell number-rows-spanned="2" background-color="orange" padding-left="1pt"> + <fo:block>Cells 2.2</fo:block> + <fo:block>and 3.2.</fo:block> + </fo:table-cell> + <fo:table-cell number-rows-spanned="3" background-color="orange" padding-left="1pt"> + <fo:block>Cells 2.3,</fo:block> + <fo:block>3.3</fo:block> + <fo:block>and 4.3.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Cell 3.1.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Cell 4.1.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 4.2.</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + + <fo:table table-layout="fixed" width="100%" space-before="40pt" border-collapse="separate" + border-separation="4pt"> + <fo:table-body> + <fo:table-row> + <fo:table-cell number-rows-spanned="2" number-columns-spanned="3" + background-color="orange" padding-left="1pt"> + <fo:block>Cells 1.1, 1.2, 1.3</fo:block> + <fo:block>and 2.1, 2.2, 2.3.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 1.4.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Cell 2.4.</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Cell 3.1.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 3.2.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 3.3.</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>Cell 3.4.</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/text_1.fo b/fop/test/pdf/accessibility/text_1.fo new file mode 100644 index 000000000..31ad31514 --- /dev/null +++ b/fop/test/pdf/accessibility/text_1.fo @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/text_2.fo b/fop/test/pdf/accessibility/text_2.fo new file mode 100644 index 000000000..f5693110e --- /dev/null +++ b/fop/test/pdf/accessibility/text_2.fo @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + <fo:block language="fr" country="FR">Apache FOP (Formatting Objects Processor) est une + application de mise en page de documents respectant le standard XSL-FO. À partir d’un + document au format XSL-FO, cette application écrite en Java effectue une mise en page et + renvoie un document prêt pour impression.</fo:block> + <fo:block>Back to English and let’s say it again: Apache FOP (Formatting Objects Processor) is + a print formatter driven by XSL formatting objects (XSL-FO) and an output independent + formatter.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/text_font-embedding.fo b/fop/test/pdf/accessibility/text_font-embedding.fo new file mode 100644 index 000000000..10c1c99d9 --- /dev/null +++ b/fop/test/pdf/accessibility/text_font-embedding.fo @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify" font-family="DejaVu"> + <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL + formatting objects (XSL-FO) and an output independent formatter. It is a Java application + that reads a formatting object (FO) tree and renders the resulting pages to a specified + output.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/accessibility/th_scope.fo b/fop/test/pdf/accessibility/th_scope.fo new file mode 100644 index 000000000..4e22b9160 --- /dev/null +++ b/fop/test/pdf/accessibility/th_scope.fo @@ -0,0 +1,68 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" + font-family="sans-serif"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="120pt" page-width="220pt" margin="10pt"> + <fo:region-body display-align="center"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" line-height="10pt" font-size="8pt"> + <fo:table width="100%" table-layout="fixed"> + <fo:table-column fox:header="true" column-width="proportional-column-width(1)"/> + <fo:table-column column-width="proportional-column-width(1)"/> + <fo:table-column column-width="proportional-column-width(1)"/> + <fo:table-header font-weight="bold"> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Table Header</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Column 1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Column 2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-header> + <fo:table-body> + <fo:table-row> + <fo:table-cell id="Row1" border="1pt solid black" padding-left="1pt" font-weight="bold"> + <fo:block>Row 1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding-left="1pt" font-weight="bold" role="TH"> + <fo:block>Row 2</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black" padding-left="1pt" role="TD"> + <fo:block>Non-header</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Cell 3.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black" padding-left="1pt"> + <fo:block>Cell 3.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/fop/test/pdf/extensions/document-information/invalid-child.fo b/fop/test/pdf/extensions/document-information/invalid-child.fo new file mode 100644 index 000000000..310c278af --- /dev/null +++ b/fop/test/pdf/extensions/document-information/invalid-child.fo @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="320pt" page-width="420pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:declarations> + <pdf:info> + <pdf:dictionary key="MyDictionary"> + <pdf:name key="key1">value1</pdf:name> + <pdf:name key="key2">value2</pdf:name> + </pdf:dictionary> + </pdf:info> + </fo:declarations> + + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" text-align="justify"> + <fo:block>pdf:info only accepts pdf:name child elements.</fo:block> + </fo:flow> + </fo:page-sequence> + +</fo:root> diff --git a/fop/test/pdf/extensions/document-information/reserved-keyword.fo b/fop/test/pdf/extensions/document-information/reserved-keyword.fo new file mode 100644 index 000000000..26320b9b7 --- /dev/null +++ b/fop/test/pdf/extensions/document-information/reserved-keyword.fo @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="320pt" page-width="420pt" margin="10pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:declarations> + <pdf:info> + <pdf:name key="Creator">MyCreator</pdf:name> + </pdf:info> + </fo:declarations> + + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body" text-align="justify"> + <fo:block>pdf:info only accepts pdf:name child elements.</fo:block> + </fo:flow> + </fo:page-sequence> + +</fo:root> |