[pstricks] Opening a data file with postscript

Herbert Voss Herbert.Voss at fu-berlin.de
Wed Sep 18 06:06:09 CEST 2024


Am 17.09.24 um 16:42 schrieb Poul Riis:
>
> How can I open a data file from within pstVerb, like the following 
> which gives an unrecoverable ghostscript error:
>
> \documentclass[a4paper,14pt]{article}
> \usepackage{pstricks-add}
>
> \begin{document}
> \pstVerb{
> /infile (hubble.txt) (r) file def
> infile closefile
> }
> \end{document}

You have to use

ps2pdf -dALLOWPSTRANSPARENCY -dNoSafer <file>.ps

otherwise Ghostscript doesn't allow to read external files.

And maybe that you need \pstverb instead of \pstVerb

Herbert



More information about the PSTricks mailing list.