calculate image size in a2-a6 formats

A

Anonymous

Guest
Hi all,
I have some kind of image editor written using php/javascript, which is based on fabricjs library (http://fabricjs.com/) and admin, logged to site has to select a2-a6 formats and orientation as portrait / landscape.
Here http://www.papersizes.org/a-sizes-in-pixels.htm I see that size of image depends not only from selected format and orientation, but also from monitor of admin.

Here https://www.sven.de/dpi/ there is DPI Calculator / PPI Calculator, say on my side it is 115.942, as I have laptop 19 inch, Resolution : 1920x1080 pixels

The question is how to calculate width and height of generated image?
That is known that size in mm = pixels * pixels in 1mm.

We can not calculate programmatically ppi value by using javascript... Is it so?

Admin MUST KNOW it... say in image editor show link to dpi/ppi Calculator and admin can get it there and enter this value in.
After admin selected his ppi value by data in http://www.papersizes.org/a-sizes-in-pixels.htm table programm must to select valid width/height in pixels, say as example
a5/portrait for my 115.94 PPI I must get 874 x 1240 pixels, as I need to get right column(3rd column) from range of my ppi. Is it so?
Entering all data template of image with all parameters is saved and image is generated.
Question is if admin reopens this template(maybe on ther device) with generated image has he enter his ppi of this devices and recalculate the image size again?

Thanks for advice!
 
Paper which is A2 to A6 in size is fixed, orientation changes since the paper is divided by 2 (folded in half).

The size of paper has nothing to do with the size of your device or its screen or the window within.

Are you trying to print the images on paper?
 
Back
Top