Monday, August 24, 2015

Insert URL in PDF using iReport

You can add a URL into your PDF file using following iReport xml file. PDF will show "Click Here!" text and URl will redirect to "http://www.google.com".

<textField hyperlinkType="Reference" hyperlinkTarget="Blank">
<reportElement x="5" y="5" width="200" height="15"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA["Click Here!"]]></textFieldExpression>
<hyperlinkReferenceExpression><![CDATA["http://www.google.com"]]></hyperlinkReferenceExpression>
</textField>

No comments:

Post a Comment