{ "cells": [ { "cell_type": "markdown", "id": "e831935b", "metadata": {}, "source": [ "# psview\n", "An example how to display PS, EPS, PDF files in canvas.\n", "To load a PS file in a TCanvas, the ghostscript program needs to be install.\n", "- On most unix systems it is installed by default.\n", "- On Windows it has to be installed from http://pages.cs.wisc.edu/~ghost/\n", " also the place where gswin32c.exe sits should be added in the PATH. One\n", " way to do it is:\n", " 1. Start the Control Panel\n", " 2. Double click on System\n", " 3, Open the \"Advanced\" tab\n", " 4. Click on the \"Environment Variables\" button\n", " 5. Find \"Path\" in \"System variable list\", click on it.\n", " 6. Click on the \"Edit\" button.\n", " 7. In the \"Variable value\" field add the path of gswin32c\n", " (after a \";\") it should be something like:\n", " \"C:\\Program Files\\gs\\gs8.13\\bin\"\n", " 8. click \"OK\" as much as needed.\n", "\n", "\n", "\n", "\n", "**Author:** Valeriy Onoutchin \n", "This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:37 PM." ] }, { "cell_type": "markdown", "id": "b867e23d", "metadata": {}, "source": [ "set to batch mode -> do not display graphics" ] }, { "cell_type": "code", "execution_count": 1, "id": "8b2d2b11", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:26.635838Z", "iopub.status.busy": "2026-05-19T20:37:26.635705Z", "iopub.status.idle": "2026-05-19T20:37:27.142737Z", "shell.execute_reply": "2026-05-19T20:37:27.142291Z" } }, "outputs": [], "source": [ "gROOT->SetBatch(1);" ] }, { "cell_type": "markdown", "id": "63bbef26", "metadata": {}, "source": [ "create a PostScript file" ] }, { "cell_type": "code", "execution_count": 2, "id": "e1faf21b", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:27.162308Z", "iopub.status.busy": "2026-05-19T20:37:27.162172Z", "iopub.status.idle": "2026-05-19T20:37:27.368509Z", "shell.execute_reply": "2026-05-19T20:37:27.368050Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "