Code covered by the BSD License  

Highlights from
eps2pdf

4.8125

4.8 | 16 ratings Rate this file 63 Downloads (last 30 days) File Size: 4.23 KB File ID: #5782

eps2pdf

by Primoz Cermelj

 

25 Aug 2004 (Updated 04 Oct 2004)

Converts an EPS file to a PDF file.

| Watch this File

File Information
Description

EPS2PDF converts an existing EPS file to a PDF file using Ghostscript. EPS2PDF reads an eps file, modifies the bounding box and creates a pdf file whose size is determined by the bounding box and not by the paper size. This can not be
accomplished by using Ghostscript only. So, all that one needs is of course MATLAB and Ghostscript drivers.

This tool is especially suited for LaTeX (TeX) users who want to create pdf documents on the fly (by including pdf graphics and using either pdftex or pdflatex). An example would be, if you are using LaTeX (TeX) to typeset documents then the usual (simple) way to include graphics is to include eps graphics using for example (if there exists myfigure.eps)

\begin{figure}
  \centering
  \includegraphics[scale=0.8]{myfigure}\\
  \caption{some caption.}
\end{figure}

To use pdflatex (pdftex) you do not need to change anything but provide another file myfigure.pdf in the same directory along with myfigure.eps. And this file, of course, can be generated by EPS2PDF.

Acknowledgements
This submission has inspired the following:
savefig
MATLAB release MATLAB 6.5.1 (R13SP1)
Other requirements Ghostscript
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (17)
03 Sep 2004 Behzad Samadi

Excellent! Thanks a lot Primoz! After a few hours of searching, I found the perfect answer here.

21 Jun 2005 Michael Hofer

Very useful, many thanks!

02 Sep 2005 Steve B

Thanks!!!! This is perfect!

08 Feb 2006 evgeni lomonosov

great!

19 Feb 2006 Sebastian F

Just what I was looking for!!!!!!!!!!
Thanks, thanks, thanks!!!!

20 Mar 2006 dsg dghnd  
13 May 2007 Ryan Edwards

This function is exactly what's needed to convert EPS files printed from MATLAB into PDF's that can be interpreted correctly by pdflatex. (A rant: I think it's stupid that pdflatex cannot directly place EPS or PS files when standard latex can. I'm sure there's a reason, but I still think it's stupid. Annoying nuances like this will keep people using Word). Anyway, I'm looking forward to putting this function through its paces with some papers I'm writing. Many thanks for this contribution.

03 Dec 2007 Jan K.

wonderful, thank you very much!

17 Apr 2008 h h

c

21 May 2008 Zhaowen Wang

it helps a lot!

10 Sep 2008 Mark Tschopp

This script works great!

18 Sep 2009 Fabio Caponetti

Works smoothly under Linux!:)

12 Apr 2010 J.Paul Rinehimer  
01 Nov 2010 Ran

This is exactly what I want!

03 Aug 2011 Folkert

Beware that this does not embed fonts in the PDF generated! I used this to create figures for an IEEE paper (which requires all fonts to be embedded) with pdflatex. The only way to get all fonts embedded was to embed them in the figures.

I did this by adding the following options to GS_PARAMETERS:

-dEmbedAllFonts=true
-dSubsetFonts=true
-dCompatibilityLevel=1.4
-dPDFSETTINGS=/printer

It might be an idea to include these options by default or to comment on this in the comment for the file.

Apart from that it is a great function, I combine it with the function 'exportfig'.

25 Oct 2011 Uli

Great job. Thanks a lot!

27 Nov 2011 Maria

This is genial and works on Linux!!! I am glad I have found this page!

Big big thanks!

Please login to add a comment or rating.
Updates
27 Aug 2004

Optimized for speed

04 Oct 2004

Minor changes to enhance usability

Tag Activity for this File
Tag Applied By Date/Time
eps Primoz Cermelj 22 Oct 2008 07:30:44
pdf Primoz Cermelj 22 Oct 2008 07:30:44
eps2pdf Primoz Cermelj 22 Oct 2008 07:30:44
epstopdf Primoz Cermelj 22 Oct 2008 07:30:44
convert Primoz Cermelj 22 Oct 2008 07:30:44
ghostscript Primoz Cermelj 22 Oct 2008 07:30:44
pdflatex Primoz Cermelj 22 Oct 2008 07:30:44
t Primoz Cermelj 22 Oct 2008 07:30:44
pdftex Primoz Cermelj 22 Oct 2008 07:30:44
convert Jacob 22 Oct 2009 03:56:59
pdftex Anders 19 Apr 2011 05:02:40
convert Anders 19 Apr 2011 05:02:49
epstopdf Keegan Ryan 08 Jul 2011 14:38:15
eps2pdf Baldrik 18 Oct 2011 11:59:57

Contact us at files@mathworks.com