- // TODO: the scale could be different in vertical and horizontal directions
- float screenDPI = (float)screenXRes / screenWidth;
- float printerDPI = (float)printerXRes / printerWidth;
+ // To make matters worse, if the application depends heavily on
+ // GetTextExtent() or does text layout itself, the output in preview and on
+ // paper can be very different. In particular, wxHtmlEasyPrinting is
+ // affected and the preview can be easily off by several pages.
+ //
+ // To fix this, we render the preview into high-resolution enhanced
+ // metafile with properties identical to the printer DC. This guarantees
+ // metrics correctness while still being fast.