Use pdftops
rather than convert
(from ImageMagick). The command is
pdftops -f <first-page> -l <last-page> -eps <input.pdf> <output.eps>
For example,
pdftops -f 4 -l 4 -eps input.pdf output.pdf
Simulator
Try the following to diagnose your problem.
% simulator.tex
\documentclass[preview,border=12pt]{standalone}
\usepackage{filecontents}
\begin{filecontents*}{input.tex}
\documentclass[preview,border=12pt]{standalone}
\usepackage{tikz}
\begin{document}
This is a TikZ output.
\begin{tikzpicture}
\draw (0,0) circle (2);
\end{tikzpicture}
\tikz\fill[red] (0,0) ellipse (3pt and 5pt); is an ellipse.
\end{document}
\end{filecontents*}
\immediate\write18{pdflatex input}
\immediate\write18{pdftops -f 1 -l 1 -eps input.pdf output.eps}
\usepackage{graphicx}
\begin{document}
I am importing EPS image.\\
\includegraphics{output}
\end{document}
Compile the code above with
latex -shell-escape simulator
dvips simulator
ps2pdf -dAutoRotatePages=/None simulator.ps
As ps2pdf
sometimes rotates the output automatically, please use -dAutoRotatePages=/None
to prevent it from doing such an unwanted rotation.
If you are using Windows, use #
instead of =
in -dAutoRotatePages=/None
because =
has a special meaning for batch files in Windows.
Very important notes
If you use opacity
in your TikZ code (PSTricks code as well), for example,
\documentclass[preview,border=12pt]{standalone}
\usepackage{tikz}
\begin{document}
This is a TikZ output.
\begin{tikzpicture}
\draw (0,0) circle (2);
\end{tikzpicture}
\tikz\fill[red,fill opacity=.5] (0,0) ellipse (3pt and 5pt); is an ellipse.
\end{document}
then you will get a rasterized output as follows.
You should check the source file which you run the tex. I had same error, than I realised that I copied my tex file from another file. so you need to look at path file of your pdf or eps extended figure maybe.
\graphicspath{{C:/blabla/blabla//figures/}}
hope this fix the problem
Best Answer
For further reference, epstopdf is named epspdf on macports, and LyX had to be configured to mirror that change:
In EPS -> PDF change "Converter to
I'm still not sure what mechanism was forming the pdf beforehand, but at least there's a solution.