How to Convert .eps to PDF in Latex ?

If you are searching for the answer how to convert .eps to pdf in Latex then i am sure that you are working on some research paper format and want to submit that. May be you can also use this to make a document a latex where you want to include some pictures.

In LaTex, you will be able to include pictures in .eps format and you will also be able to convert it in pdf file and will be able to include the pictures in the pdf file converted by the LaTex Software.


Suppose you want to include one Matlab figure in Latex using .eps format, then just save it with the file extension .eps . In the below picture you will be able to see that how i am converting one .jpeg Matlab figure to a figure in .eps format to make it suitable for LaTex.

Convert_eps_to_pdf_in_Latex

Now you will see that one file with .eps extension will get saved in the location where you have saved your .eps figure.

Now you need to use some common syntax to include in the LaTex file. You can use the below syntax to include the .eps figure in your LaTex file.

Code:

begin{figure}[!t]

centering

includegraphics[width=9 cm,height=8 cm]{yourfigurename.eps}

caption{Your Figure name}

label{yourfigurename}

end{figure}

Note:

In the above code you need to replace the yourfigurename.eps with your figure name that you have given.Also you need to keep in mind that you must not put any space in the figure name.Otherwise LaTex will not read the .eps file.

You can customize your figure height by changing the width and height.

In the caption you can put your own caption that you want.Also for label you can use your own label.

Now the important thing that you need to include in the header part of the file is

usepackage{epstopdf}

You can include this after the documentclass[conference]

usepackage{epstopdf} this instruction is to convert the .eps file to pdf file so that after running the LaTex you will also get the pdf file of your .eps file.

Now i think you are done and if you use the above instruction, you will be able to convert your .eps file to pdf file and will also be able to successfully add figure in your LaTex file.

If you have any question or doubt, you can ask me in the comments.I will surely answer your question.

Himadri is a part time blogger. He loves to write on technology and technology related tips & tricks. Blogging is his passion! He is an Electronics and Telecommunication Engineer.

Facebook Twitter Google+ YouTube 

Related Posts Plugin for WordPress, Blogger...

9 thoughts on “How to Convert .eps to PDF in Latex ?

  1. Hi, nice tutorial…but I am facing this problem.

    For matlab plot like the one in your example this works brilliantly.

    But for other pictures like pngs if you convert them to eps (for example with matlab itself) and then try to use them in latex the quality drops….

    But if you use the generated eps in microsoft word you keep that quality. therefore it must be the epstopdf package that is not doing his conversion properly.

    Did you came across this problem?? Can you suggest solutions?

    Regards
    F

    • Hello, if you want to convert png to pdf then you must need to use the command and package epstopdf. But what i have seen from my experience is that if the picture is in png format then the quality degrades. Because png holds as much pixel as it can and when it gets converted, some pixels get discarded. But for jpeg the picture is already with less number of pixels and the loss is less.

  2. I was able to include a figure in my Latex document using a Matlab figure that I had previously converted into .eps format. However, the figure in latex has lost all of its text and the axis do not have labels and numbers anymore. I have checked using an eps viewer if my eps figure was complete, and yes, it was.

    Another problem I run into, is that since I am using usepackage{epstopdf}, I was expecting to find a pdf file with the same name as my eps figure in the directory, but it’s not there. Any idea of what is going on, and how to fix this problem?

    My header part looks like this:

    documentclass{article}
    usepackage[all]{xy}
    usepackage{amssymb}
    usepackage{amsmath}
    usepackage{amsfonts}
    usepackage{amsthm}
    usepackage{amscd}
    usepackage{eucal}

    usepackage[dvips]{epsfig}
    usepackage{graphicx}
    usepackage{epstopdf}

    usepackage{ulem}
    usepackage{wrapfig}
    addtolength{hoffset}{-2cm} addtolength{topmargin}{-2.8cm}
    addtolength{textwidth}{3 cm} addtolength{textheight}{6.2 cm}

    and I have

    begin{figure}
    centering
    includegraphics{Feas_region_TEST1}
    caption{Fig. 5.1}
    end{figure}

    • As far my knowledge goes, you should get pdf file in the folder with the same name as your .eps file. I get it always. May be you are not adjusting all the options correctly in QUICK BUILD. You just check by going LaTex> Option> Quick Build and then try to select view pdf option.

  3. Turns out all text is there (when I open the pdf file directly from my documents folder, I can see everything just fine), it was just that I couldn’t see it in the latex pdf viewer. However, the pdf file with the same name as the eps file was not created , and I am still not sure why.

  4. Himadri. It works fine. I use Miktex for Latex and I could convert all my thesis pictures numbering more than 50 in one go. Thanks a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>