4

I am making slide using beamer. I'd like to use hyperlink button at the end of the table from another PDF file named table4.

I am trying the following, but "main" button shows up different slide. Is there any way that table and hyperlink button are shown in the same slide?

{
        \label{within} 
    \setbeamercolor{background canvas}{bg=}
    \includepdf[width=1.8\textwidth, height=2.5\textheight, pages=1]{table4.pdf}

    Back to \hyperlink{main}{\beamerbutton{main}}.
}   
4

You can use the pagecommand= option of \includepdf; to control the position of the button, you can use \vspace* and \hspace. A little example, in which the button is first stored in a macro and then the macro is used for pagecommand:

\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{pdfpages}

\newcommand\mybutton{%
\vspace*{.5\textheight}\hspace*{.4\textwidth}Back to \hyperlink{main}{\beamerbutton{main}}%
\setbeamertemplate{footline}{}
}

\begin{document}

\begin{frame}
test\hypertarget{main}{}
\end{frame}
{
\setbeamertemplate{footline}{}
\setbeamertemplate{headline}{}
\setbeamertemplate{navigation symbols}{}
\setbeamercolor{background canvas}{bg=}
\includepdf[offset=0 -80,height=2\textheight, pages=1,pagecommand=\mybutton]{c.pdf}
}
\begin{frame}
A normal frame.
\end{frame}

\end{document}

And the frame containing the included pdf file and the button (I modified the settings for my example, but you can do the adjustments that you consider necessary):

enter image description here

The file c.pdf I used in the example was the result of pdflatex-ing the following c.tex:

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\end{document}
  • Thanks Gonzalo. I got the hyperlink button, but now I have another problem. After using "pagecommand", beamer theme has changed to original warsaw. Before using this command, it was just plain theme from pdf file. I have no idea why it changed. – justin Apr 10 '12 at 2:49
  • @justin: please see my updated answer. – Gonzalo Medina Apr 10 '12 at 3:41
  • @justin: since my answer apparently solves your problem, please consider "accepting" it by clicking on the tickmark below the vote count. – Gonzalo Medina Apr 10 '12 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.