I have a charting tool that uses Java and Graphics2D. I would like to scale the resulting chart so that it exactly matches the 8.5 x 11 (landscape) page when printing. A.
I saw somewhere that page scaling is 72 inches, but I'm not sure how this relates to screen dpi. To make things more complicated, my screen works at 144dpi, but most users of the package will use 72dpi or 96dpi (not sure which ...?). Does anyone have experience managing all of these tags, including printing?
Using the java.awt.print package, I can print my diagram, but they are too large using multiple pages. I can scale them using Graphics.scale(double, double) , but how to calculate the scaling factor so that the diagrams fit on one page? And is Graphics.scale(double, double) right tool anyway?
source share