Printing a BufferedImage in Java

后端 未结 4 1791
春和景丽
春和景丽 2021-01-25 19:34

Does anyone know how to print a BufferedImage in Java?

4条回答
  •  再見小時候
    2021-01-25 20:15

    check my solved problem here: Java PrinterJob, high quality printing ends up with 72 DPI anyway the solution was to draw the image to paintComponent(Graphics g) method for a JPanel and pass this panel to Print utility class, at that class you can easily scale the image/Panel as you want preserving the image high quality, it sounds the same but the result was not, i read an advice about using the image outside "onscreen graphics context" but had no idea how to do that until i tried this solution, try it

提交回复
热议问题