How to Convert .eps to PDF in Latex ?

Spread the love

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 Subrah Saha

Himadri is an ICT Professional who writes for his technology tips & tricks related blog TechnTechie. Though it is hard to balance time in between professional life and blogging, he still manages time to work for his own blog and writes almost regularly. The dashboard of this WordPress is the only place where he does not feel tired! Read my other blogs @ PetCare and Teleinfo

0 0 votes
Article Rating

Subscribe
Notify of
guest

9 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Facebook User
Facebook User
11 years ago

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

Himadri
11 years ago
Reply to  Facebook User

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.

Nodame
Nodame
11 years ago

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… Read more »

Himadri
10 years ago
Reply to  Nodame

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.

Nodame
Nodame
11 years ago

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.

Pannir
Pannir
10 years ago

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.

Himadri
10 years ago
Reply to  Pannir

Thank you for your comment Pannir. I posted this blog to make the use of LaTex easy …

vineeth
vineeth
10 years ago

I was facing problems with .eps file compilation
Thank you for simple and clear instructions..
it helped a lot..

9
0
Would love your thoughts, please comment.x
()
x