View Full Version : page margins
07-25-2002, 09:12 PM
anobody can tell me
is there any function to set page margins before preview?
07-26-2002, 03:10 AM
yup, you can set a default-PageFormat for the report (and so define the pagesize and the margins). This pageformat is used as default format for previewing the report and for printing etc.
You will have to set a java.awt.print.Paper object defining the paper sizes and the margins. There are no predefined values for the various papersizes, so you have to calucate the needed values by yourself.
Have more fun,
07-26-2002, 09:49 AM
thanks a lot Thomas.
i'm searching for docs about it. . . so.
i've created a Paper and PageFormat onjects
java.awt.print.Paper papel = new java.awt.print.Paper();
papel.setImageableArea(36, 36, 540, 720);
but the report ignore this.
i can't find methos in the jfreereport classes for accesing the report's Paper and PageFormat. . . it's this possible?
07-26-2002, 09:56 AM
i fount it.