Q:

Why is the ratio of print units to mm 34/9

I'm trying to print a grid of labels to a sheet of A4 label paper.
The user specifies the left and top margins of the paper in mm.
A4 is 210 x 297.
Siverlight tells me that the printable area is 793 x 1122 if I add the printable area and the margins together.
printDocument.PrintPage += (s, e) =>
    {
        var printableArea = e.PrintableArea;
        var pageMargin = e.PageMargins;
    }

If I do the maths the ratio between 210 & 793 and 297 & 1122 is 3.777777 recurring which (more accurately) is 34/9.
Why is it this value?
It is always this value regardless of the destination of the print? I've checked an actual printer and an XPS document set up to be A4 in size and it appears to be the case, but I don't want to get caught out in 6 months time.
If it does change how can I work out this relationship in code?

A:

After a little bit more research I've worked out the answer.
The sizes Silverlight is using is the paper size in device independent units - calculated as 1/96th of an inch.

297 mm = 11.6929 inches

Multiply that by 96 and you get 1122.51
Similarly

210 mm = 8.2677 inches

which works out to 493.70
So now I understand where the numbers come from I can happily use my slightly more accurate calculation of 34/9 along with a comment explaining where it comes from.

