I would like to convert my TikZ images to EPS format and save in a separate file while pdfLaTeX compiles my document, ideally. Note I am using MikTeX and TeXstudio.
Otherwise, I would like to be able to convert TikZ pictures into EPS from a LaTeX file using pdfLaTeX.
I've tried the method found here but the pictures do not work entirely correctly. There is some cutoff (missing parts of the image), plus it is a pain to convert each figure this way.
Example code below.
test.text
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usepackage{pgf}
\usetikzlibrary{arrows, calc, decorations.pathmorphing, shapes}
\pgfrealjobname{test}
\begin{document}
\beginpgfgraphicnamed{levels}
\begin{tikzpicture}[scale=1, font=\normalsize, every node/.append style={transform shape}]
\node[rectangle, draw, minimum width=1.5em, minimum height=1.5em, line width=0.05em] (n1) at (0,0) {1};
\node[rectangle, draw, minimum width=1.5em, minimum height=1.5em, line width=0.05em] (n2) at (2,0) {2};
\end{tikzpicture}
\endpgfgraphicnamed
\end{document}
In the command prompt:
latex --jobname=levels test.tex
dvips -o levels.eps levels.dvi
Any ideas?

epsinstead ofpdf?pdflatex --jobname=levels test.texwill createpdfresults notdvi. – Ignasi May 14 '15 at 07:58