displaying (on the screen) a letter-size page (8.5" x 11"), users can specify page margins in either cm or in.

When processing the user's selections and redisplaying the user's document on the screen, I need to subtract the margins from the width and height, so that the page remains the same size.

IE and FF automatically return the computed values in pixels whereas Chrome and Safari do not. Is there a quick and painless solution to retrieve computed pixel values when in Chrome or Safari?