views:

46

answers:

1

Hello all,

While putting an image element in PDF report, how can we give the alt description or similar kind of description for that image? The idea is to read the description when some screen reader is used to read the PDF. Currently, the reader (JAWS) says just 'graphic' when encountering an image in the PDF.

Thanks!

+1  A: 

Found out at last. In case anyone is having similar query; You could use the hyperlinkTooltipExpressionto set the alternate text. Something like this;

<image isLazy="true">
    <reportElement positionType="Float" x="0" y="0" width="100" height="100"/>
    <imageExpression class="java.lang.String"><![CDATA[$P{imageToBeShown}]]></imageExpression>
    <hyperlinkTooltipExpression><![CDATA["Description goes here"]]></hyperlinkTooltipExpression>
</image>
Aviator
Sorry pasted the wrong link. This one is about adding tool tips to a field box. http://stackoverflow.com/questions/2431346/tool-tip-text-in-ireport
Gordon