View Full Version : page margins
Anonymous
07-25-2002, 09:12 PM
hi guys.
anobody can tell me
is there any function to set page margins before preview?
Anonymous
07-26-2002, 03:10 AM
Hi,
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,
said Thomas
Anonymous
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);
new java.awt.print.PageFormat().setPaper(papel);
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?
Anonymous
07-26-2002, 09:56 AM
at lats.
i fount it.
:))
myReport.setDefaultPageFormat
thanks
JFreeReport rulez!