The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

a solution

Posted by Nabani Silva on May 30, 2001 at 1:17 AM

This helps you to get the minimun margins of the printer, at least thats what Ive understood...

PageFormat format1 = new PageFormat();
Paper paper1 = new Paper();
paper1.setImageableArea(0,0,paper1.getWidth(),paper1.getHeight());
format1.setPaper(paper1);
PageFormat format = printerJob.validatePage(format1);

My problem now is that I cant set that margins to the printerjob, it always print inside the default margins...
If someone knows how to do it please write me...





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us