I really don't see this as practical. Your web page has no knowledge of font size (zoom level), page margins, orientation or anything else you'd need to know to construct a print preview image.
In addition, it's possible for a page to reference images and other content from other sites. How will your code know what is needed here?
Fortunately, the browsers I use (IE and Chrome) provide print preview, so you'd get it for free anyway. But if you're trying to implement print preview manually, I just don't see that as a practical goal.