Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Java printing Margins Date: Sun, 8 Jun 2014 22:40:05 +0000 (UTC) Organization: A noiseless patient Spider Lines: 38 Message-ID: References: <6eo8p9lrdvp70st73bhbj8c3ughv5slbaj@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 8 Jun 2014 22:40:05 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="15200"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EB0MURy2SmRUREGE/XMeq2jBQJ0TPReQ=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:Qumo4DTaHxvvQ663ze5TBFd9Eqk= Xref: csiph.com comp.lang.java.programmer:28685 On Sun, 08 Jun 2014 14:09:46 -0700, Knute Johnson wrote: > On 6/8/2014 06:17, Roedy Green wrote: >> On Wed, 04 Jun 2014 20:25:38 -0700, Knute Johnson >> wrote, quoted or indirectly quoted someone >> who said : >> >> >>> I think you should set the PageFormat to landscape. Please see the >>> following code that I wrote to print images. >> >> Nothing rotated. I could get it to rotate by choosing landscape by >> clicking into the Windows printer dialog. >> >> And of course I was able to get it to rotate with AffineTransform. >> >> > Maybe I misunderstood what you wanted. To print landscape just select > landscape but if you want your image drawn rotated, you have to do that > yourself. Knute's program works here and does exactly what it says on the tin: pick an image that's longer than its wide, select landscape, select the printer, hit print and its done. The printed result is exactly what I expected: the image occupies the full printable area of the page (without changing default margins, which Knute's program doesn't allow, and is in landscape mode on the page. I'm running Linux Fedora 20, java version "1.6.0_45", and printing to a LAN-attached HP Laserjet 5 with a JetDirect network interface card. I assume that's pretty close what you wanted. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |