Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2006, 06:06 PM
Authorized User
 
Join Date: Mar 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing and printers

Hello

I've got a program here which among other things prints out the contents of a JPanel using a PrintJob object and the Printable interface.

My question is this: what's the link between the size of the JPanel as returned by getSize(), and the size of the printed output? Does it depend on the resolution of the printer? Mine is 1200dpi - should I expect that 600dpi printers will print twice the size?

Can I get at the printer's resolution somehow though the PrintJob object?

Thanks
Neil



 
Old May 4th, 2006, 08:57 AM
Authorized User
 
Join Date: Apr 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vakorde
Default

as PrintJob is a interface you will get 2 methods those will be useful in your case.
getPageDimension()
and
getPageResolution()

depend what implementation you are using, you will get the details.

---------------------------
Vikrant Korde
3i Infotech, Vashi,
Mumbai, Maharashtra, India.





Similar Threads
Thread Thread Starter Forum Replies Last Post
List the Available printers ajit Java Basics 2 May 4th, 2007 07:54 AM
Command line printing to specific printers , trays sudarshan73 Reporting Services 0 January 23rd, 2007 03:51 PM
Add Printers ldoodle Classic ASP Basics 2 November 14th, 2006 09:20 AM
How to show all available printers name? vijaykumartaduri General .NET 1 October 13th, 2006 12:03 AM
printing without printDialog on mult. printers frankv25 VB.NET 7 January 10th, 2005 11:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.