I have a page where on button-click a popup shows (it is a div with an iframe containing content to be printed).
The problem i got now is to set the size of the popup/div so that it will have the same width/heigth relation as the printed result (it will be printed to A4 always).
Does anyone know how i calculate this size (width/heigth)?
Example: The div contains several paragraphs containing text and some images. I click the Button and the popup opens showing the downscaled printview in A4. Problem here is to be as accurate as possible to determine the width (and heigth) of the div so that it looks exactly as the printed results (linebreaks, and so on).