LaTeX forum ⇒ Graphics, Figures & TablesCannot determine size of graphic when inserted a pdf image Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
daiyue
Posts: 17
Joined: Mon May 21, 2012 5:58 pm

Cannot determine size of graphic when inserted a pdf image

Postby daiyue » Sat Feb 06, 2016 8:06 pm

Hi, I tried to insert a pdf image using the code:

  1. \usepackage{graphicx}
  2. \begin{figure}
  3. \centering
  4. \includegraphics[scale=0.4]{time_elapsed.pdf}
  5. \caption{Processing speed for SVM Classification}
  6. \label{fig5.5}
  7. \end{figure}


but got a error message:

  1. ! LaTeX Error: Cannot determine size of graphic in 5_Web_data_annotation_using_
  2. SVM/figures/time_elapsed.pdf (no BoundingBox).


I also tried:

  1. \usepackage{pdfpages}
  2. \begin{figure}
  3. \centering
  4. \includepdf[scale=0.4]{time_elapsed.pdf}
  5. \caption{Processing speed for SVM Classification}
  6. \label{fig5.5}
  7. \end{figure}


but got the following error:

  1. ! Package keyval Error: page undefined.


I was using the very same image in eps (which is fine), and it is too large to upload to overleaf, so I decided to transform it to a pdf file. So how to resolve the issue.

Many thanks

User avatar
Johannes_B
Site Moderator
Posts: 4161
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Feb 06, 2016 9:45 pm

You are trying to run pdflatex in DVI-mode, where only eps figures are allowed. Search for regular pdflatex in your editor and its buttons.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

synred
Posts: 6
Joined: Tue Feb 16, 2016 11:55 pm

Postby synred » Wed Feb 17, 2016 12:26 am

I'm having this same problem with eps files.

I'm trying to move lyx document from Linux to eps. I get this error when I try to view a document containing an eps image. This image worked fine on Linux. I ran 'eps2eps' on it and it still doesn't work.

The error is coming from latex not lyx directly. lyx displays the image fine.

So far I see no solutions posted ...

synred
Posts: 6
Joined: Tue Feb 16, 2016 11:55 pm

Postby synred » Wed Feb 17, 2016 1:28 am

So in the context of 'lyx' I found a work around ... use one of the other viewing options on offer in 'Documents' menu. The two div options and 'ps2pdf' as will as plain 'postscript' work. 'ps2pdf' looks best.

The default 'pdLatex' invoked by the googly eyes option does not work, but fails as described above and by original post in this thread.

I seem to recall being forced to use 'ps2pdf' in 'lyx' years ago on 'linux' as well but don't remember why.

As others with problem are not using 'lyx' it appears the problem is in 'pdLatex' somewhere ...

-Traruh

User avatar
Johannes_B
Site Moderator
Posts: 4161
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Feb 17, 2016 9:31 am

pdflatex cannot use eps files directly. This is neither a LyX thing, nor really an error of pdflatex. It is just a fact.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 2 guests