Dviout: viewing of files with eps graphics causes an error

Herbert Schulz herbs2 at mac.com
Fri Dec 1 02:05:23 CET 2023



> On Nov 30, 2023, at 5:52 PM, Akira Kakuto <kakuto at jcom.zaq.ne.jp> wrote:
> 
> On 2023/11/30 21:06, vgivanov--- via tex-live wrote:
>> Hi, All!
>> I have a problem with dviout (ver.3.19.0) from the TeXlive 2023 distribution.
>> My OS is Windows 10.
>> An attempt to view a dvi file with dviout causes an error, if the source
>> file contains any eps graphics.
>> E.g., I create the following sample source file 'test.tex':
>> --- begin ---
>> \documentclass{article}
>> \usepackage{graphicx}
>> \begin{document}
>> \includegraphics{fig.eps}
>> \end{document}
>> --- end ---
>> and compile it by latex to 'test.dvi'.
>> Running '<texlivedir>\bin\windows\dviout.exe test.dvi' I see a pop-up message:
>> --- begin ---
>> Failed to make fig.pbm by the command
>> <texlivedir>\tlpkg\tlgs\bin\gswin64c.exe @tmp$.@@@
>> The file @tmp$.@@@ is a parametric file
>> --- end ---
>> The content of @tmp$.@@@ (which is generated by dviout) is:
>> --- begin ---
>> -q
>> -dNOPAUSE
>> -sDEVICE=pbmraw
>> -sOUTPUTFILE=fig.pbm
>> -r600
>> -g2200x1808
>> tmp$.ps
>> quit.ps
>> --- end ---
>> The content of tmp$.ps (which is generated by dviout too) is:
>> --- begin ---
>> /NumbDict countdictstack def
>> 1 dict begin
>> /showpage {} def
>> userdict begin
>> 0.000000 0.000000 translate
>> 1.000000 1.000000 scale
>> -0.000000 -0.000000 translate
>> (fig.eps) run
>> countdictstack NumbDict sub {end} repeat
>> showpage
>> --- end ---
>> The output of the command '<texlivedir>\tlpkg\tlgs\bin\gswin64c.exe @tmp$.@@@' is:
>> --- begin ---
>> Error: /invalidfileaccess in --run--
>> Operand stack:   (fig.eps)   (r)
>> Execution stack:   %interp_exit   .runexec2   --nostringval--   run --nostringval--   2   %stopped_push   --nostringval--   run   run false   1   %stopped_push   1976   1   3   %oparray_pop   1975   1   3 %oparray_pop   1960   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   run  --nostringval--   2   %stopped_push   --nostringval--   1976   1   5 %oparray_pop   run
>> Dictionary stack:   --dict:758/1123(ro)(G)--   --dict:0/20(G)-- --dict:88/200(L)--   --dict:1/1(L)--   --dict:88/200(L)--
>> Current allocation mode is local
>> Last OS error: Permission deniedCurrent file position is 178
>> GPL Ghostscript 10.02.0: Unrecoverable error, exit code 1
>> --- end ---
>> If I manually create the file 'fig.pbm' by the command
>> '<texlivedir>\tlpkg\tlgs\bin\gswin64c.exe -q -dNOSAFER -dNOPAUSE -sDEVICE=pbmraw -sOUTPUTFILE=fig.pbm -r600 -g2200x1808 tmp$.ps'
>> the command '<texlivedir>\bin\windows\dviout.exe test.dvi' works without problems.
>> The idea seems to be that the command "gswin64c.exe @tmp$.@@@" runs Ghostscript with a list of parameters from the file @tmp$.@@@, but it does not work that way, at least for version 10.02.0.
>> How can I fix the problem?
>> WBR,
>>   Vladimir.
> 
> The feature is disabled because of a security problem that any program
> can be executed. In order to enable the feature, you have to change
> the 'gsx:' part each time in the following way:
> 
> Option
> Setup Parameters...
> Graphic
>  Check that Ghostscript is On(default)
>  Add an option -dNOSAFER in gsx:
> gsx:.../tlgs/bin/gswin64c.exe -dNOSAFER
> click Save
> click OK
> 
> Best,
> Akira
> 

Howdy,

I know nothing about Windows but wouldn't -dNOSAFER change to 
-dALLOWPSTRANSPARENCY for a more recent Ghostscript?

Good Luck,

Herb Schulz
herbs2 at mac.com





More information about the tex-live mailing list.