开发者

Get a data from a web page into a PDF format using Tomahawk in JSF?

i am a newbie to JSf and Tomahawk Technology. In applic开发者_如何转开发ation i am having a datatable, i want store the information from he data table into a PDF format on a click of a button using Tomahawk and SandBox.Kindly Help.


Even better, use JasperReports. It uses iText behind the scene to export reports to PDF.


You may need iText for this.
Also see this - http://www.junlu.com/msg/281869.html


As you have mentioned you are using sandbox, use exporterActionListener component in the sandbox to export the data from data tabel into PDF. You need the itext-0.99.jar use the same version

Code sample

<!-- sandbox tag library declaration -->
<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
   .
   .  <!-- your data Tabel will be here -->
   .
   .

<h:commandButton value="Export as pdf">
     <s:exporterActionListener for="Id of the Data Tabel" fileType="PDF" />
</h:commandButton>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜