# Using mdframed package with pstricks option in pdflatex possible?

I want to use the mdframed package with the pstricks option (for dashed lines etc) with pdflatex. But doing so threw an Undefined control sequence ... \c@lor@to@ps error.

The internet tells me, that's a pstricks error which can be fixed by including pstricks with a [pdf] option. But mdframed includes pstricks by itself and doesn't accept a pdf option, so that won't work. If I add a \usepackage[pdf]{pstricks} before mdframed myself, the document compiles, but the box is empty/invisible.

Any way to do this other than using latex instead of pdflatex and converting the dvi to pdf? I'm somewhat surprised by this error, as using this package and pdflatex shouldn't be an exotic thing!?

For reference, I'm using up-to-date Texlive 2014 on Win7, compile with pdflatex --shell-escape 1.tex and my test document is as simple as

\documentclass{article}
% \usepackage[pdf]{pstricks} % With or without this
\usepackage[framemethod=pstricks]{mdframed}

\begin{document}
before box!

\begin{mdframed}
box content!
\end{mdframed}
\end{document}

• It works for me with miktex. – user11232 Apr 16 '15 at 13:05
• It works for me too with TeXLive 2014 (Linux), latest state before being frozen – user31729 Apr 16 '15 at 13:07
• Try \PassOptionsToPackage{pdf}{pstricks} before \usepackage{mdframed} – user31729 Apr 16 '15 at 13:08
• The \PassOption... thing allows it to compile without including pstricks explicitely, but in the resulting pdf, the box is still not visible! There is a 1-autopp.pdf file generated, which includes only the box. But it's not "combined" into the 1.pdf. (Doesn't matter if via passoption or including pstricks) – Basti Apr 16 '15 at 13:15
• Maybe a problem with perl? – Peter Ebelsberger May 7 '15 at 18:43