From $ROOTSYS/tutorials/graphics/psview.C

// An example how to display PS, EPS, PDF files in canvas
// To load a PS file in a TCanvas, the ghostscript program needs to be install.
// - On most unix systems it is installed by default.
// - On Windows it has to be installed from
//   also the place where gswin32c.exe sits should be added in the PATH. One
//   way to do it is:
//     1. Start the Control Panel
//     2. Double click on System
//     3, Open the "Advanced" tab
//     4. Click on the "Environment Variables" button
//     5. Find "Path" in "System varibale list", click on it.
//     6. Click on the "Edit" button.
//     7. In the "Variable value" field add the path of gswin32c
//        (after a ";") it should be something like:
//        "C:\Program Files\gs\gs8.13\bin"
//     8. click "OK" as much as needed.
//Author: Valeriy Onoutchin

#include "TROOT.h"
#include "TCanvas.h"
#include "TImage.h"

void psview()
   // set to batch mode -> do not display graphics

   // create a PostScript file

   // back to graphics mode

   // create an image from PS file
   TImage *ps = TImage::Open("feynman.eps");

   if (!ps) {
      printf("GhostScript (gs) program must be installed\n");

   new TCanvas("psexam", "Example how to display PS file in canvas", 600, 400);
   TLatex *tex = new TLatex(0.06,0.9,"The picture below has been loaded from a PS file:");

   TPad *eps = new TPad("eps", "eps", 0., 0., 1., 0.75);