I was trying to print one form by Java Program. I have used Graphics2D to construct one grid (22X6, say). Since the form needs 1cm margin on both left and right sides, I made the grid from point(28,230) to (584,590). The form looks fine on the screen exactly the way I want it.
Now the problem is: when I tried to print the form by calling PrinterJob.print() using PageFormat.defaultPage(), which is 8.5X11, about 1 inch wide can not be printed out on both sides so that my form is incomplete. I tried to change the printer preference to set the margin as 0, it is not work right.
Please help me out.
Thanks!
Now the problem is: when I tried to print the form by calling PrinterJob.print() using PageFormat.defaultPage(), which is 8.5X11, about 1 inch wide can not be printed out on both sides so that my form is incomplete. I tried to change the printer preference to set the margin as 0, it is not work right.
Please help me out.
Thanks!