java.awt.print: Setting the DPI
843807Aug 6 2005 — edited Aug 23 2005Hello,
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