0

I have a problem I'd like to figure out how to solve.

So, I'm trying to print a picture in java (using some GUI module I've found online - that simulates how the picture is going to look (1-1 scale) on paper (I've printed some actual pictures on paper)), in specific size (known by cms).

The problem is, I've found only implementations that accept pixels size (width and height) and not cms, as a result, the size of the picutre comes out differently in different computers due to different pixels density (in computers that have good quality (more pixels per cm) the picutre comes out much smaller comparing to other less qualitative computers (smaller pixels density) - simply because there are more pixels per cm (in the actual screen) so the picture is smaller (in cm - and actually - on paper)). Are any of you familiar with any library that is able to print a picutre in java by cms and not pixels?

Phiter
  • 14,570
  • 14
  • 50
  • 84
Tim
  • 1
  • So cms != content management system but cms = centimeters? – Thomas Feb 25 '16 at 11:53
  • If you know the pixel density (dpi or ppi) you can convert pixel values to metric values, that's probably all you need. – Thomas Feb 25 '16 at 11:54
  • cms = centimeters. And I've tried converting but it doesn't work well on all computers. Trying to find a library that accepts actual cms and not pixels. – Tim Feb 25 '16 at 11:56
  • You need to know the DPI of the picture, the DPI of the screen and make conversions between from DPI to CMs. It's generally not a simple process. Something like [this](http://stackoverflow.com/questions/18460008/printable-prints-bufferedimage-with-incorrect-size/18466550#18466550) might give you some ideas – MadProgrammer Feb 25 '16 at 11:59

0 Answers0