3

I know that the following can't work. I want the PDF to sit at {X}.

\documentclass{article}
\pagestyle{empty}
\usepackage{tikz,lmodern}
\usepackage{pdfpages}

\begin{document}  

\includepdf[scale=0.8, pagecommand={
\begin{tikzpicture}[remember picture,overlay]
    \node at ([xshift=7cm,yshift=-3cm] current page.north west) {X};   
\end{tikzpicture}}]{test}

\end{document}

I'd like to know how can I position and scale the PDF inside a tikzpicture.

Marc Palm
  • 297

1 Answers1

5

According to chapter 106 in the manual (of version 3.0) you could do something like this:

\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}
  \pgfdeclareimage{img}{Chick1.png}
  \node at ([xshift=7cm,yshift=-3cm] current page.north west) {\pgfuseimage{img}};
\end{tikzpicture}
\end{document}

Here is a slightly different MWE:

\documentclass[tikz]{standalone}    
\begin{document}
\begin{tikzpicture}
  \pgfdeclareimage{img}{Chick1.png}
  \node (img1) at (0,0) {\pgfuseimage{img}};
  \node (img2) at (5,0) {\includegraphics{Chick1}};
  \draw[->] (0,0) -- (1,0);
  \draw[->] (0,0) -- (0,1);
  \node at (img1.south) {PGF};
  \node at (img2.south) {graphicx};
\end{tikzpicture}
\end{document}

and the corresponding output:

enter image description here

Chick1.png is taken from here.

Dror
  • 22,613