I have a document that I would like to include .png and .eps images in.
I use graphicx to show my .png images.
I have tried to include an .eps figure using epsfigure but it won't have it.
If I compile my document to ps then pdf it complains that my .png images dont have bounding boxes.
Is there a simple way around this or should I just not bother with .eps figures... I have over 100 figure in .png and I don't feel like converting them all to .eps and changing all my graphicx code to epsfig code. Like wise I'd rather not convert my .eps files to .png if I can help it.
Thanks,
Graphics, Figures & Tables ⇒ How do I: Compile to PDF when I have .eps and .png images
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
How do I: Compile to PDF when I have .eps and .png images
Hi Eenzc,
I recommend to use epstopdf to convert the eps images to pdf format and use pdfLaTeX to include pdf and png images. The LaTeX package epstopdf could make that easier.
Stefan
I recommend to use epstopdf to convert the eps images to pdf format and use pdfLaTeX to include pdf and png images. The LaTeX package epstopdf could make that easier.
Stefan
LaTeX.org admin
Re: How do I: Compile to PDF when I have .eps and .png images
The epstopdf package requires that I enable shell escape however I am using TeXnic centre to compile to pdf and do not use a command line to compile.
Thus I don't know where to enter the command:
--enable-write18
Thus it won't convert my .eps file.
Any ideas?
Thus I don't know where to enter the command:
--enable-write18
Thus it won't convert my .eps file.
Any ideas?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: How do I: Compile to PDF when I have .eps and .png images
Start TeXnicCenter (TXC), press Alt+F7 and add this switch to the command line arguments for the compiler. The best is to do that for every profile.
Best regards
Thorsten¹
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How do I: Compile to PDF when I have .eps and .png images
Thank you this works.