Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printer imageable area



To answer my own question: it appears that if you expand the imageable area in code and then validate it, it works. Something like this:
Paper paper = pageFormat.getPaper();
paper.setImageableArea(0, 0, paper.getWidth(), paper.getHeight()); //no margins
pageFormat.setPaper(paper);
pageFormat = printerJob.validatePage(pageFormat);


On Aug 15, 2005, at 3:24 PM, Nick Howes wrote:

My app needs to print Java2D and it works OK, but I get complaints about the large margins around the printed image. I've been doing some investigation and it appears that java.awt.print.PageFormat objects always have a one inch margin, despite being passed through a PrinterJob pageDialog() method with a printer that can have much smaller margins. I found some stuff at Sun about using javax.print.PrintService and MediaPrintableArea, but I don't get a MediaPrintableArea returned under Mac OS X (at least I don't with 1.4.2_07).

Anyone dealt with this stuff before and willing to share some insight?

Thanks, Nick


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Printer imageable area (From: Nick Howes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.