# several problems wih pgf-blur (doube shadow, loop in object hiearchy in xdvipdfmx)

I am trying to hunt down some bugs in pgf-blur, some of which have been reported here already (this for example).

All the following experiments are done with TL 2016.

There are two bugs:

2. Bug: Inclusion in XeLaTeX

As mentioned a few times on TeX StackExchange (e.g., here, multiple usage of drop shadows in xelatex is broken.

See included file mwe-graphic.tex. With xelatex it produces wrong shadows, but with lualatex or pdflatex perfectly fine ones:

\usepackage{tikz}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}
\end{tikzpicture}
\end{document}


Possible solution: Fixes incorporated into pst-blur by Andrew Stacey in http://bazaar.launchpad.net/~tex-sx/tex-sx/development/files

With this file, multiple shadows work, but different problems reappeared:

# ad 2. Bug: Inclusion in XeLaTeX

Consider the following file mwe.tex

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{center}
\includegraphics{mwe-graphic.pdf}
\end{center}
\end{document}


## a. Using default pgf-blur from CTAN or TeX Live

1. luatex mwe-graphic.tex; xelatex mwe.tex produces a correct graphic, but the xelatex run is corrupted:

xdvipdfmx:fatal: Loop in object hierarchy detected. Broken PDF file?

2. xelatex mwe-graphic.tex; xelatex mwe.tex produces output woth incorrect shadows, see above

## b. Using the version linked above

1. luatex mwe-graphic.tex; xelatex mwe.tex
2. xelatex mwe-graphic.tex; xelatex mwe.tex

both produces a correct graphic, but the xelatex on mwe run is corrupted:

xdvipdfmx:fatal: Loop in object hierarchy detected. Broken PDF file?

Now my question: Can anyone provide a version that fixes all these problems? I will contact also the original author, but I am not overly optimistic.

Thanks

Norbert

• Are you interested in more bugs or just these? ;) (I'm thinking of the Beamer problem.) – cfr Jul 22 '16 at 3:37
• I need those fixed, but I would like to see some development around pgf-blur, which seems to be stagnant by now. – norbert Jul 22 '16 at 3:38
• One idea is seeing up a collaborative repository for those interested. – norbert Jul 22 '16 at 3:41
• For those interested, I had contact with the original author and he is fine if development continues somewhere else, he will not develop pgf-blur anymore. I have set up a github project and I hope that some people will contribute: github.com/norbusan/pgf-blur – norbert Jul 26 '16 at 13:56
• @loop-space I heard from Martin that you helped a lot in development of pgf-blur. Are you interested in a collaborative developement of pgf-blur? Can you contact me per email or any other way. – norbert Jul 26 '16 at 15:47

The patch I suggested in https://tex.stackexchange.com/a/445321/2388 works for the multiple drop shadow here too:

\documentclass{report}
\usepackage{tikz}
\makeatletter
\tikzset{
\pgfbs@savebb
\pgfsyssoftpath@getcurrentpath{\pgfbs@input@path}%
\pgfbs@apply@canvas@transform
\pgfsetfillcolor{black}%
{\pgftransformshift{\pgfpoint{\pgfbs@midx}{\pgfbs@midy}}}%
\pgfbs@usebbox{fill}%
\pgfbs@restorebb
},
}
\makeatother
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}

• Hi Ulrike, thanks for that, it is the same fix (in principle) as Andrew Stacey did in the file I linked above (he used \newcount etc but the content is the same). But even with only these changes for multiple shadows applied, the inclusion of one pdf in another is still broken when using xelatex - I am not sure whether this is a problem of pgf-blur or more of xelatex. Fortunately recent luatex(whatever) changes at least make it work with lualatex, both the multiple shadows as well as the inclusion. – norbert Aug 14 '18 at 4:31