Fixed "latex2png: error: eps2eps failed to translate .pdf to .eps" message in latex2rtf

OMG!! I finally fixed it.
Under Windows latex2rtf diisplayed following error:
latex2png: error: eps2eps failed to translate l2r_00123.pdf to l2r_00123.eps
for each image in my latex file.
That was very sad because this method is used to convert all equations, fugures and tables in word format.
The configurations seemed ok:
The problem was in eps2eps script in miktex. This script is magical. I haven't completely understood why it does nothing when called from latex2rtf. At the same time it runs successfuly when running standalone.
i wrote my new script pdf2eps_my.bat with the following contents:
"C:\Program Files (x86)\gs\gs9.05\bin\gswin32c.exe" -q -dNOCACHE -dNOPAUSE -dBATCH -dSAFER -sDEVICE=epswrite -sOutputFile=%2 %1
and changed script 
"c:\Program Files (x86)\latex2rtf\latex2png" 
I changed 
PDF2EPS="eps2eps" 
with 
PDF2EPS="pdf2eps_my" 
it works because miktex/bin directory is in my PATH

3 comments:

  1. Thanks a lot! You saved me from a lot of pain!

    ReplyDelete
  2. In my case (win8.1, 64b) I had changed -sDEVICE=epswrite to -sDEVICE=eps2write, because the following error was displayed: unknown device: epswrite

    Thanks!

    ReplyDelete
  3. Had the same problem. This solved it. Thanks!

    ReplyDelete