Break the PDF document after 100 pages

前端 未结 2 469
囚心锁ツ
囚心锁ツ 2021-01-25 08:11

I am working with JasperReports and iReport tool. One of the requirements the client wants is that the PDF file will be generated to a 100 page document only.

Could you

2条回答
  •  北海茫月
    2021-01-25 08:13

    As @WEG mentioned in the answer for JasperReport size limit question it can be done with help of this parameters:

    • net.sf.jasperreports.governor.max.pages.enabled - a flag indicating whether the governor that checks if a report exceeds a specified limit of pages is turned on. With this property enabled, the JR engine will stop the report execution if the number of pages becomes greater than a custom given value;
    • net.sf.jasperreports.governor.max.pages - if the governor that checks if a report exceeds a specified limit of pages is turned on, this property will indicate the maximum number of pages allowed to be ran, in order to prevent a memory overflow error. If the number of pages in the report becomes greater than this value, the report execution will be stopped;
    • REPORT_MAX_COUNT - an integer allowing limit the datasource size.

提交回复
热议问题