rekhasasik Posted February 6, 2008 Share Posted February 6, 2008 Hi,I need a help rearding printing a jasper generated PDF having pages of different sizes.For example the first page should be of size LETTER(8.5 X 11) and the rest should be of size A4.As per the design of iReports, I can find there is possibility of configuring page size for the total report(PDF)only. can anyone have a idea on this.Thanks in Advance ThanksSasi Rekha Link to comment Share on other sites More sharing options...
lucianc Posted February 8, 2008 Share Posted February 8, 2008 JasperReports does not (currently) support multiple page sizes in the same (design) report. The only thing you could do is to create multiple reports (having different page sizes), and use batch exporting to obtain a single PDF output. HTH,Lucian Link to comment Share on other sites More sharing options...
janve Posted February 10, 2008 Share Posted February 10, 2008 Hi Lucian, The batch exporting sample shows that it can merge 3 (or more) reports to 1 pdf file. Every report section starts with pagenumber 1 in the pdf. Can you give me a clue if there a possibility to get a continuous pagenumbering in the pdf file? Best regards, Jan Link to comment Share on other sites More sharing options...
lucianc Posted February 14, 2008 Share Posted February 14, 2008 It is possible by using an additional report parameter whose value is used as initial page number:Code:<parameter name="PageNumberOffset" class="java.lang.Integer"/><variable name="PageNumber" class="java.lang.Integer"> <variableExpression>new Integer($V{PAGE_NUMBER}.intValue() + $P{PageNumberOffset}.intValue())</variableExpression></variable>...<textField> <textFieldExpression>"Page " + $V{PageNumberOffset}</textFieldExpression></textField> Then, when you fill the reports, you would collect the number of generated pages and use this value as PageNumberOffset for the next report to fill:Code:[code]int pages = 0;for (..reports..) { ... params.put("PageNumberOffset", new Integer(pages)); ... JasperPrint print = fillReport(params); pages += print.getPages().size();} Regards,LucianPost edited by: lucianc, at: 2008/02/14 12:54 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now