Creating graphical image of document

Gday!

I have such a problem: I need to convert a document into graphical image (.bmp) such as “print preview” shows and detach it to file system.

Can anybody suggest anything?

Thanks.