# tikz hatched rectangle auto-pst-pdf conflict

I am trying to get tikz to work with auto-pst-pdf, but the hatched rectangle I am drawing is generated correctly only if I remove the package auto-pst-pdf from the preamble. I really need these two to work since I am using this package in the main code with psfrag.

Here is a minimum working example:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{tikzpicture}
\draw[pattern=north west lines, pattern color=blue] (0,0) rectangle (2,4);
\end{tikzpicture}

\end{document}


If I use auto-pst-pdf, the output is just a rectangle filled completely with black color. If I remove the package, the output is as expected.

I must mention that lines, circles, etc are working ok with both packages loaded.

• Isn't auto-pst-pdf cone to work with pstricks and friends? Jun 29 '17 at 10:39
• Here, your MWE works fine with pdflatex --shell-escape myFile.tex. What distribution are you running ? Jun 29 '17 at 10:42
• can you check in another viewer ? And you should really consider not using psfrag.Don't tell David Carlisle I said this Jun 29 '17 at 10:57
• I use MiKTeX-pdfTeX 2.9.4902 (1.40.14) (MiKTeX 2.9 64-bit). I enabled --shell-escape under Execution Modes -> pdfLaTeX -> Switches. @percusse: what should I use if I want to replace eps text with latex text? Jun 29 '17 at 11:16
• @marsupilam I ran your code in cmd, and also get wrong result Jun 29 '17 at 11:19

With an up-to-date TL2017 there is no problem, with or without auto-pst-pdf (xelatex and pdflatex)