It is not simple to do this.Mr Marcel, can i embedd ghostviewer into my application so that the user can view the file with in my apllication window itself. If so please tell me how; if possible with a piece of code.
If you just want to display the PS file, you can make ghostscript give you a flattened version of the document ( an image, pixmap ) and you just paint it in your window.
If you want to interact with the objects inside the file (texts, vectors), you will have to parse the PS with GhostScript and construct the objects yourself.
A code snippet will not help you in this case.
I suggest taking a good look at the GhostView sources. It also displays a rasterized version of the postscript file. Most application are not even concerned with the ghostscript sources. They just take gs32dll.lib and link with it. The API is decently documented on their site.You can use Google to find out more details.
Regards
Bookmarks