Is there a defect in the `preview` package of TeX-Live?

For this I recommend standalone:

\documentclass[tikz]{standalone}
\usetikzlibrary{shapes}

\begin{document}

\begin{tikzpicture}[every node/.style={top color=white, bottom color=gray}]
\node{Node content};
\end{tikzpicture}

\end{document}

enter image description here

The grey border is the window background when I took the screenshot. The following is the exact PNG that gets produced when the first line is

\documentclass[tikz,convert]{standalone}

and pdflatex is run with the -shell-escape option.w

enter image description here


When compiling with lualatex you should load luatex85. In the new luatex \pdfoutput is no longer defined and this confuses preview.

\RequirePackage{luatex85}
\documentclass{minimal}

\usepackage{tikz}
\usetikzlibrary{shapes}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\begin{document}
\begin{tikzpicture}[every node/.style={top color=white, bottom color=gray}]
\node{Node content};
\end{tikzpicture}
\end{document}