简体   繁体   中英

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 application 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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM