[Tex/LaTex] problem to insert inkscape pdf into latex

graphics

I'm trying to insert the 1.pdf_tex which was generated by Inkscape into my article and I always get this error message:

! Package keyval Error: page undefined.
See the keyval package documentation for explanation.
Type H for immediate help.

! LaTeX Error: Cannot determine size of graphic in images/1.pdf (no BoundingBox
).
l.55 …graphics[width=\unitlength,page=1]{1.pdf}}
%

! Package keyval Error: page undefined.
…….
! LaTeX Error: Cannot determine size of graphic in images/1.pdf (no BoundingBox
).

l.55 …graphics[width=\unitlength,page=2]{1.pdf}}
%

I have two documents (1.pdf_tex and 1.pdf) in a directory images\ and I've already put

\usepackge{graphicx}
\usepackage{color}
\usepackage{transparent}
\graphicspath{{images/}}

at the very beginning of my document. Here is how I insert the 1.pdf_tex:

\begin{figure}[h]
  \centering
  \def\svgwidth{\columnwidth}
  \input{images/1.pdf_tex}
  \caption{Test}
\end{figure}

I really want to know why I can't compile and get my final document.

1.pdf_tex

part 1part 2

save file:save file

Best Answer

You have to remove the ,page=1 and all subsequent \put commands which have included repeatedly the input PDF.

This is probably an error of the Inkscape tool, probably this: https://bugs.launchpad.net/ubuntu/+bug/1417470

You can use next command to delete all the puts minus the first

  sed -i '/page=[2-9]\|page=1[0-9]/d' *tex