https://issues.apache.org/bugzilla/show_bug.cgi?id=47104
Summary: can not add Alt text for images
Product: Fop
Version: 0.95
Platform: PC
URL: http://wiki.apache.org/xmlgraphics-fop/PDF_Accessibili
ty
OS/Version: Windows XP
Status: NEW
Severity: blocker
Priority: P1
Component: images
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Hi,
As we want to add acessiblity to PDF, I have to put alt text for images in
pdf. If this is not a bug then how can i add alt text to images in PDF.
I made change in code as well as in fo document but now getting exception.
Changes made in fo document.
<fo:external-graphic src="url('servlet-context:/images/header.jpg')"
content-width="4cm" content-height="3cm" fox:alt-text="test test test"
scaling="uniform"/>
Change made in java class.
//Add accessibility to pdf
foUserAgent.getRendererOptions().put("accessibility",
Boolean.TRUE);
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF+ ";mode=painter",
foUserAgent, out);
Stack trace:
Caused by: org.xml.sax.SAXParseException: The prefix "fox" for attribute
"fox:alt-text" associated with an element type "fo:external-graphic" is not
bound.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.