ASF Bugzilla – Attachment 23251 Details for
Bug 46705
[PATCH] Enhancement: PDF Accessibility
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Documentation - will be merged into trunk by Jeremias
accessibility.html.txt (text/plain), 6.12 KB, created by
Jost Klopfstein
on 2009-02-12 02:45:47 UTC
(
hide
)
Description:
Documentation - will be merged into trunk by Jeremias
Filename:
MIME Type:
Creator:
Jost Klopfstein
Created:
2009-02-12 02:45:47 UTC
Size:
6.12 KB
patch
obsolete
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ><html lang="en"> > <head> > <title>Tagged PDF / PDF accessibility in Apache FOP</title> > </head> > <body> ><h1>Accessibility</h1> ><p><a href="http://www.section508.gov">Section 508</a> defines accessibility in the context of electronic documents for the US but it impacts also other countries.</p> ><p>The first implementation of accessibility for Apache FOP was done for the PDF output generator. However, it is based on the new intermediate format, thus the effort to add other output formats should be much smaller than the initial work for PDF.</p> > ><h2>Implementation - General aspects</h2> ><p>The current implementation uses 2 XSLT transforms as a preprocess in Fop.getDefaultHandler. > The first <code>addPtr.xsl</code> adds a pointer attribute with an unique value to each FO that appears in the structure tree. > The second transform <code>reduceFOTree.xsl</code> removes all elements, attributes and text from the input FO, that are not required in the structure tree. > The result from this second transform can be seen in the new IF, where it is split per page-sequence. See the element <code>structure-tree</code> below:</p> > ><pre> ><?xml version="1.0" encoding="UTF-8"?> ><document xmlns="http://xmlgraphics.apache.org/fop/intermediate" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:nav="http://xmlgraphics.apache.org/fop/intermediate/document-navigation"> > <header> > <x:xmpmeta xmlns:x="adobe:ns:meta/"> > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="> > <xmp:CreateDate>2009-01-20T22:27:23-08:00</xmp:CreateDate> > <xmp:CreatorTool>Apache FOP Version SVN branches/Temp_AreaTreeNewDesign</xmp:CreatorTool> > <xmp:MetadataDate>2009-01-20T22:27:23-08:00</xmp:MetadataDate> > </rdf:Description> > </rdf:RDF> > </x:xmpmeta> > </header> > <page-sequence> > <structure-tree> > <fo:flow xmlns:fo="http://www.w3.org/1999/XSL/Format"> > <fo:block xmlns:foi="http://xmlgraphics.apache.org/fop/internal" foi:ptr="N10014"/> > </fo:flow> > </structure-tree> > <page index="0" name="1" page-master-name="1" width="594720" height="792000"> > <page-header/> > <content> > <viewport width="594720" height="792000"> > <font family="sans-serif" style="normal" weight="400" variant="normal" size="12000" color="#000000"/> > <text x="0" y="10266" ptr="N10014">hello</text> > </viewport> > </content> > <page-trailer/> > </page> > </page-sequence> > <trailer/> ></document> ></pre> ><h3>Enabling accessibility</h3> ><p>There are 3 ways to enable accessibility:</p> ><ol> > <li><b>Command line</b> The command line option -a turns on accessibility. > <code>fop -a -fo testcases/tc1/tc1.fo -pdf testcases/tc1/tc1.pdf</code> > </li> > <li><b>Embedding</b> <code>userAgent.getRendererOptions().put("accessibility", Boolean.TRUE);</code> > </li> > <li><b>Optional setting in fop.xconf file</b> ><pre> ><fop version="1.0"> > <accessibility>true</accessibility> > ... ></fop> ></pre> > </li> > </ol> > ><h3>Changes to your XSL-FO input files</h3> ><ul> > <li>Table cells require a table row as the parent.</li> > <li>Ensure that the order of <code>fo:block-container</code> in a page corresponds to the reading order.</li> > <li>Alternate text for images: The attribute <code>fox:alt-text</code> has been added for <code>fo:external-graphic</code> and <code>fo:instream-foreign-object</code>. > </li> > <li>Document's default language > </li> > > </ul> > > ><h2>Implementation - PDF specific</h2> > ><h3>Tagged PDF / PDF accessibility links</h3> > <ul> > <li><a href="http://partners.adobe.com/public/developer/en/pdf/PDFReference.pdf">PDF Reference 1.4, chapter 9.7 Tagged PDF, chapter 9.8 Accessibility Support</a></li> > <li><a href="http://en.wikipedia.org/wiki/Portable_Document_Format#Accessibility">Wikipedia</a></li> > </ul> > <h3>Testing Tagged PDF's / PDF accessibility</h3> > <ul> > <li>Acrobat Professional - Accessibility Check creates a report indicating any deficiencies with a PDF document.</li> > <li>Screen Readers can read tagged PDF's, see <a href="http://en.wikipedia.org/wiki/Portable_Document_Format#Accessibility">Wikipedia</a></li> > </ul> > > <h3>Requirements for tagged PDF's</h3> > <ul><li>The documents logical structure has to be included into the PDF file (see PDF Reference 1.4 section 9.7).</li></ul> > > <h2>Additional requirements for accessible PDF's</h2> > <p>Screen readers require additional information in tagged PDF files in order to read documents aloud. > To enable proper vocalization PDF supports the following features:</p> > ><ul><li> >Providing textual descriptions for images (see PDF Reference 1.4 section 9.8.2, "Alternate Descriptions")</li> > <li>Specifying the natural language used for text in a PDF document - for example, > as English or German (see PDF Reference 1.4 section 9.8.1, "Natural Language Specification"). An accessible PDF document should include the document's default language which applies > to all text in a PDF document. You can change a language on descendant elements by overriding the document's language.</li></ul> ><h3>Hints</h3> ><p>Make sure to call the new PDF code when you embed FOP in your Java code: MimeConstants.MIME_PDF + ";mode=painter"</p> ><p>Adjust the Java heap size in order to process larger files.</p> > </body> ></html> > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 46705
:
23250
| 23251 |
23261
|
23262
|
23278