[gs-devel] Recent preview-latex (or latex?) is again incompatible with ghostscript

Ikumi Keita ikumi at ikumi.que.jp
Tue May 25 13:50:53 UTC 2021

Dear Ghostscript developers,

It seems that recent preview-latex is again incompatible with
Ghostscript. We'd appreciate if you could take a look at the problem and
hopefully provide us a fix.

In most cases, the prescription you devised for us before works well.
However, it doesn't work for particular case by some reason unknown to

The sequence which ended up with Ghostscript error is like this:
/usr/local/bin/rungs -sOutputFile\=mwe.prv/tmpMjSoK9/pr1-1.png -q -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r94.1897x94.1727 -dDELAYBIND
GS>systemdict /.addcontrolpath known {/PermitFileReading (mwe.pdf) .addcontrolpath
/PermitFileReading (mwe.prv/tmpMjSoK9/preview.dsc) .addcontrolpath} if {<</PermitFileReading[(mwe.pdf)(mwe.prv/tmpMjSoK9/preview.dsc)]>> setuserparams .locksafe} stopped pop {DELAYSAFER{.setsafe}if}stopped pop/.preview-BP currentpagedevice/BeginPage get dup null eq{pop{pop}bind}if def<</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne or{.preview-BP gsave 1 1 0.878431 setrgbcolor clippath fill grestore }{pop}ifelse}bind/PageSize[1 1]>>setpagedevice/preview-do{/.preview-ST[count 4 roll save]def dup length 0 eq{pop}{setpagedevice}{ifelse exec}stopped{handleerror quit}if .preview-ST aload pop restore}bind def  (mwe.prv/tmpMjSoK9/preview.dsc)(r)file /.preview-ST 1 index def dup 0 setfileposition 413()/SubFileDecode filter cvx exec .preview-ST
GS>dup dup 413 setfileposition 54()/SubFileDecode filter cvx<<>>preview-do
   **** Error reading a content stream. The page may be incomplete.
               Output may be incorrect.
The pdf file and dsc file are attached below. What is a bit strange to
me is that the original LaTeX file[1] didn't give error but only a small
defect of black blob in the generated png file a year ago. So I suspect
that the change introduced in LaTeX core between TeX Live 2019 and TeX
Live 2020 affects the contents of the generated pdf file so that
Ghostscript falls into error rather than a mere defect, because both gs
9.52 and 9.54 give the same error here.

[1] https://tex.stackexchange.com/questions/534438/tikz-and-auctex-different-results/536029

We'd appreciate if you could confirm the problem and find a way to deal
with this problem.

Best regards,
Ikumi Keita

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwe.pdf
Type: application/pdf
Size: 31772 bytes
Desc: sample pdf file
URL: <http://ghostscript.com/pipermail/gs-devel/attachments/20210525/abf5b1f2/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: preview.dsc
Type: application/postscript
Size: 493 bytes
Desc: sample dsc file
URL: <http://ghostscript.com/pipermail/gs-devel/attachments/20210525/abf5b1f2/attachment-0001.ai>

More information about the gs-devel mailing list