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 15:49:28 +0000 (UTC) Organization: A noiseless patient Spider Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 8 Jun 2014 15:49:28 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="2874"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+z/pxDQ0Ry7AWTHzUJTxjJZ0IJA7xAwfk=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:5mqTs7gbiRTvYUJD/sZu2G9dImI= Xref: csiph.com comp.lang.java.programmer:28683 On Sun, 08 Jun 2014 06:19:47 -0700, Roedy Green wrote: > On Wed, 04 Jun 2014 20:27:30 -0700, Knute Johnson > wrote, quoted or indirectly quoted someone > who said : > >>No it doesn't and if you figure that out I would love to know. I >>originally thought that you could get that information from the >>PrinterJob somehow but I can't figure it out. > > I had a look at the code. The margins are set to one inch all the time. > There is no native method to find out the actual margins. > I'm not altogether surprised: to complexity of getting these details for any accessible printer no matter where it is and how it is accessed by the requesting system or where the printer server that supports it is located. There is a standard protocol (IPP) that can be used to get hold of paper sizes and printer capabilities, and its even supported by UNIX, Linux, OSX and Windows (post XP) for remote job submissions. While it could certainly be used to get these details from a remote printer or print server, its not at all obvious whether it can be used by an application to interrogate a local print spooler (on the same machine): even CUPS print servers, which do use IPP to talk to remote printers, don't necessarily allow an application to ask them about their printers and their capabilities. Are there any Java classes that support IPP? -- martin@ | Martin Gregorie gregorie. | Essex, UK org |