Reputation: 3472
Is anyone aware of the formula google docs use to convert pixels to inches?
Right click on a cell and click table properties then you get the image below, note I have opened up firebug and you can clearly see each td is set with a px width. I can work with inches or mm or equivalent for printing to pdf but pixels is not so accurate.
This is all done on client side hence the javascript tag...
Upvotes: 3
Views: 23464
Reputation: 11
Old question and the same old answer but from a different source. I've been trying to get images to display the "correct" size when they have been inserted into a google document. They always were too small. So I inserted one of known size and printed it and manually checked the size. From those dimensions I can confirm that Google does indeed use 96 DPI.
Upvotes: 1
Reputation: 6246
Haroon, I'm not sure what you're trying to do, but PC displays are generally 96DPI and I think google have emulated this with the zoom level they have set in their documents webapp.
We can confirm it's close, by taking a screenshot of googledocs and pasting it into paint, and then measuring the document width.
I got 796 pixels from my select tool in paint. I am using A4 portrait pages that are 210mm wide. This means we can do 796/210 to get our pixel density.
1 millimetre = 3.79 pixels
multiply by 2.54
1 inch = 96 pixels
I don't know if this will remain consistent with other monitor resolutions or paper sizes, but I would expect it would be close!
Upvotes: 6