I created a A5 report in ireport and use in java application.
I change A5 to A4 format on runtime and View Page but when print Page output be A5 format.
following code:
JasperDesign _des = JRXmlLoader.load("report1.jrxml");
_des.setPageHeight(842);
_des.setPageWidth(595);
JasperReport _rep = JasperCompileManager.compileReport(_des);
JasperPrint jasperPrint = JasperFillManager.fillReport(_rep, params, _data);
JRViewer_com = new JRViewer(jasperPrint);
There must be something missing in your code that is not supplied in your question. When I created an example and ran it it works. The only change I made was I used the static method
JasperViewer.viewReport(jasperPrint, true);to view the report.If you could provide a small single java class that is runnable and reproduces the issue, I may be able to help more.