I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).

I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.

I didn't had this problem with all previous TexLive versions.

Here is a minimal example with one tikz and one pstricks image:

\usepackage{pstricks, pstricks-add}
\usepackage{graphicx, color}


\begin{tikzpicture}[line cap=round,line join=round,x=0.5cm,y=0.5cm]
\clip(-3.6008835336224467,-3.8322994902133702) rectangle     (3.6645946388488806,2.9075908995685467);
\draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
\fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
\draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
\draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
\draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
\draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);


\psset{xunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}


The result (in both) should be

enter image description here

but I receive

enter image description here

Any ideas on how to handle this issue?

P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.


2 Answers 2


Ghostscript-9.52 introduced new operators for setting fill and stroke opacity (.setconstantfillopacity, .setconstantstrokeopacity), deprecating the hitherto existing .setopacityalpha. Starting with GS version 9.53, warning messages are produced if the old operator is used.

Furthermore, a new gs commandline option for activating opacity features was introduced:

ps2pdf -dALLOWPSTRANSPARENCY myfile.ps myfile.pdf

TikZ/pgf example:

enter image description here


\usetikzlibrary {patterns,shapes.symbols}

  \begin{tikzpicture}[thick,fill opacity=0.5]
    \filldraw[fill=red] (0:1cm) circle (12mm);
    \filldraw[fill=green] (120:1cm) circle (12mm);
    \filldraw[fill=blue] (-120:1cm) circle (12mm);
  \tikz {
    \begin{scope}[transparency group]
      \begin{scope}[blend mode=screen]
        \fill[red!90!black] ( 90:.6) circle (1);
        \fill[green!80!black] (210:.6) circle (1);
        \fill[blue!90!black] (330:.6) circle (1);

    \shade [left color=red,right color=blue] (-2,-1) rectangle (2,1);
    \begin{scope}[transparency group=knockout]
      \fill [white] (-1.9,-.9) rectangle (1.9,.9);
      \node [opacity=0,font=\fontencoding{T1}\fontfamily{ptm}\fontsize{45}{45}\bfseries] {Ti\emph{k}Z};
    \begin{scope}[transparency group]
      \draw [line width=5mm] (0,0) -- (2,2);
      \draw [line width=5mm] (2,0) -- (0,2);

PSTricks example:

enter image description here




  • Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
    – Joseph Wright
    Oct 4, 2018 at 11:36
  • 1
    @AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile. Oct 4, 2018 at 12:16
  • 2
    This answer saved my life. I encountered this issue after upgrading GS.
    – WDC
    Nov 9, 2018 at 18:36
  • 1
    This is the answer that keeps on giving. Its been two and a half years, and it just saved me a lot of pain. Thank you Jan 21, 2020 at 16:08
  • 1
    It looks like the gs developers made a breaking change to transparency handling in 9.51 (ghostscript.com/pipermail/gs-devel/2020-May/010295.html). I solved the problem by downgrading gs to 9.27 Jul 9, 2020 at 8:02

I'm using Kile. In Kile I use the pdflatex command with the -shell-escape option. For working with opacity I have found this solution. Use the auto-pdf package with this option: \usepackage[pspdf={-dDELAYSAFER}]{auto-pst-pdf}


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .