Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

java.awt.print: Setting the DPI

843807Aug 6 2005 — edited Aug 23 2005
Hello,

my problem is that I do not know how to set another resolution for my printout instead of the default 72 dpi.

Situation: I have a graph output on a JComponent; some temperature sensor input during the day. But I don't want a hardcopy - it shall be a completely new print layout, landscape, covering the whole day.

However, when I create a PrinterJob, I only get the 72 dpi of the screen. Scaling is no solution since the graph will look poor with this resolution.

I browsed all the docs but I cannot find a way to make the system produce a Graphics instance with another dpi setting, like 300 dpi.

Any ideas?

Michael

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 20 2005
Added on Aug 6 2005
2 comments
2,934 views