简体   繁体   中英

Printing data from JSF Primefaces Datatable page wise

I am working with Primefaces Datatable showing paginated results with 100 records per page. I would like to add print functionality to it page wise, for example if user is on 4th page he will be shown records from 301-400, and if he selects for print option only that page/records should get print.

Any idea how it can be achieved. I tried using but it just displays the visible part of the Datatable not all the (scrolled down) records.

Just figured out the option of using Dataexporter with pageOnly tag,

<p:dataExporter type="pdf" target="aTable" fileName="audit_list" pageOnly="true"/>  

Needs to improve on the output more with formatting

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