Skip to content

Problem converting eps to pdf #887

Closed
@znss1989

Description

@znss1989

I've been using texlive 2016 with ST3 LaTeXTools. I have my source images at location ./figure. My code is like this:

\usepackage{graphicx}
\usepackage{epstopdf}

\graphicspath{{./figure/}}
\DeclareGraphicsExtensions{.eps}

...

\begin{figure}[t]
\center{\includegraphics[width=0.49\textwidth]{iie1}}
\caption{...}
\label{fig: iie1}
\end{figure}

When building, it reports that

Basic Builder: running pdflatex...done.

Errors:

[no file]:964: Package pdftex.def Error: File `./figure/iie1-eps-converted-to.pdf' not found. [...cludegraphics[width=0.49\textwidth]{iie1}]

Warnings:

(Log parsing issues. Disregard unless something else is wrong.)

[Done!]

I did it this way before, with other similar images having already converted to .pdf files. But after a recovery of OS, this converting is not working. What's the problem?

Activity

znss1989

znss1989 commented on Oct 31, 2016

@znss1989
Author

This is some information shown in the log file.

Missing character: There is no € in font ptmr7t!
Missing character: There is no ˜ in font ptmr7t!
Missing character: There is no â in font ptmr7t!
Missing character: There is no € in font ptmr7t!
Missing character: There is no ™ in font ptmr7t!
Package epstopdf Info: Source file: <./figure/iie1.eps>
(epstopdf) date: 2016-10-31 17:03:06
(epstopdf) size: 723372 bytes
(epstopdf) Output file: <./figure/iie1-eps-converted-to.pdf>
(epstopdf) Command: <repstopdf --outfile=./figure/iie1-eps-converte
d-to.pdf ./figure/iie1.eps>
(epstopdf) \includegraphics on input line 964.
runsystem(repstopdf --outfile=./figure/iie1-eps-converted-to.pdf ./figure/iie1.
eps)...executed safely (allowed).

Package epstopdf Info: Result file: <./figure/iie1-eps-converted-to.pdf>.

! Package pdftex.def Error: File `./figure/iie1-eps-converted-to.pdf' not found
.

See the pdftex.def package documentation for explanation.
Type H for immediate help.
...

l.964 ...cludegraphics[width=0.49\textwidth]{iie1}
}
Using draft setting for this image.
Try typing to proceed.
If that doesn't work, type X to quit.

LaTeX Font Info: Try loading font information for OT1+pcr on input line 964.

(c:/texlive/2016/texmf-dist/tex/latex/psnfss/ot1pcr.fd
File: ot1pcr.fd 2001/06/04 font definitions for OT1/pcr.
)
Overfull \hbox (0.84283pt too wide) in paragraph at lines 964--965

Other existing images with such file names as foo-eps-converted-to.pdf are just OK.

ig0774

ig0774 commented on Oct 31, 2016

@ig0774
Contributor

Can you try running repstopdf --outfile=./figure/iie1-eps-converted-to.pdf ./figure/iie1. eps directly from the directory containing your TeX file?

Do other eps images convert or does it just insert the pre-existing PDF? I'm asking because the most obvious cause of issues with epstopdf is that GhostScript isn't available on the PATH being used by LaTeXTools (in which case, you'd need to modify the texpath setting).

znss1989

znss1989 commented on Oct 31, 2016

@znss1989
Author

I ran the command you gave in git bash, the corresponding pdf file is generated correctly. Then what's the problem of automatically processing then?

And about the PATH, how should I do to include it in the PATH used by LaTeXTools? Not the Windows system variable PATH, right?

Thanks.

ig0774

ig0774 commented on Oct 31, 2016

@ig0774
Contributor

You can just ensure its in the Windows PATH system variable or you can use the texpath setting provided by LaTeXTools to add it just for LaTeXTools (if you use that setting, remember to include ;$PATH at the end so it includes the standard Windows PATH).

znss1989

znss1989 commented on Nov 1, 2016

@znss1989
Author

I've added D:\Program Files\gs\gs9.20 to Windows PATH, and change the texpath setting in LaTeXTools.sublime-setting in Package setting - User as below:

    "windows": {
        // Path used when invoking tex & friends; "" is fine for MiKTeX
        // For TeXlive 2011 (or other years) use
        // "texpath" : "C:\\texlive\\2011\\bin\\win32;$PATH",
        "texpath" : "C:\\texlive\\2016\bin\\win32;D:\\Program Files\\gs\\gs9.20;$PATH",
        // TeX distro: "miktex" or "texlive"
        "distro" : "texlive",
        // Command to invoke Sumatra. If blank, "SumatraPDF.exe" is used (it has to be on your PATH)
        "sumatra": "D:\\Program Files\\SumatraPDF\\SumatraPDF.exe",
        // Command to invoke Sublime Text. Used if the keep_focus toggle is true.
        // If blank, "subl.exe" or "sublime_text.exe" will be used.
        "sublime_executable": "D:\\Program Files\\Sublime Text 3\\sublime_text.exe",
        // how long (in seconds) to wait after the jump_to_pdf command completes
        // before switching focus back to Sublime Text. This may need to be
        // adjusted depending on your machine and configuration.
        "keep_focus_delay": 0.5
    },

But it still does not automatically convert eps to pdf, but have to manually do that job. Anything else I should check? Thanks.

znss1989

znss1989 commented on Nov 1, 2016

@znss1989
Author

I found a typo in my texpath, fix it from C:\\texlive\\2016\bin\\win32 to C:\\texlive\\2016\\bin\\win32. Problem gone.

My bad. But not sure why the compiling of text runs anyway when the path is not correct.

Thanks for helping.

ig0774

ig0774 commented on Nov 1, 2016

@ig0774
Contributor

Yes, that is strange. Glad you've got things sorted!

cchen-vis

cchen-vis commented on Sep 2, 2018

@cchen-vis

works for me! Thks!

lxk-221

lxk-221 commented on Jun 23, 2023

@lxk-221

works for me!Thks!Just to note, you need to install GhostScript first from https://www.ghostscript.com/releases/ , and then add gs path to the tex path. the package itself can't convert eps to pdf, it needs to use repstopdf or gs! hope this note can help someone who read this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ig0774@znss1989@cchen-vis@lxk-221

        Issue actions

          Problem converting eps to pdf · Issue #887 · SublimeText/LaTeXTools