# Stopping slides scrolling in Beamer

I have some back-up slides at the end of my presentation, which are accessed by means of hyperlinks. For this reason, I would like to "stop" the scrolling of the slides (done by clicking PageUp / Page Down or rotating the mouse wheel ) at my last "actual" slide, preventig me to show the accessory slides by mistake during the presentation. Is this possible somehow ? I am not sure whether I made myself clear or not ...

MWE:

\documentclass{beamer}
\begin{document}

\begin{frame}[label=mainBody]
txt 1

\end{frame}

\begin{frame}
txt 2

\end{frame}

\begin{frame}
Thank you
\end{frame}

\begin{frame}[label=accessorySlide]
accessory information
\end{frame}

\end{document}


I'd like, when in presentation mode, not to be possible to scroll beyond the "thank you" slide

• A suggestion: a couple of copies of the thank you slide to absorb a misclick or two – Chris H Jan 13 '17 at 15:37
• Thought that ... yet if a "clean" solution is available it would be preferable – dario Jan 13 '17 at 15:38
• Section 5.1.4 of the beamer manual implies a clean solution. Note that \againframe gives a way to repeat a frame without copy-pasting – Chris H Jan 13 '17 at 15:46
• I vote for reopening the question. The linked duplicate is more about automated looping for animation purposes. Here it was asked just to prevent the viewer from going past the final official slide. I have a neat solution too I would like to post here. – AlexG Jan 13 '17 at 16:34
• I honestly don't see how the question can be considered answered. I've tried the solutions proposed in the other question and they don't work ... – dario Jan 13 '17 at 16:39

This is based on the answer to the previous question about looping a final slide or two. Instead it flips back to the final slide when a copy of that slide is advanced to. I've only tested it in Adobe reader X for Windows so far (in presentation mode).

\documentclass{beamer}

\begin{document}
\begin{frame}
Title
\end{frame}
\begin{frame}
Content
\end{frame}
\begin{frame}[label=TheEnd]
Thank you
\end{frame}

\begingroup
\edef\x{\endgroup
\pdfpageattr{
\the\pdfpageattr /Dur 0.2
/AA <<
/O <<
/S/JavaScript /JS(
var retVal=app.setTimeOut( "this.pageNum--;", 10);
)
>>
>>
}%
}%
\x

\begin{frame}
Backup
\end{frame}
\end{document}

• Formatting is stuffed up by the double-right-pointy-bracket. It's not really fixable from my phone but I'll edit when I'm on a computer. – Chris H Jan 13 '17 at 17:24
• I just tried to fix the formatting. Can you please check if everything is ok? – user36296 Jan 13 '17 at 17:27
• This does not work to me: scrolling twice when in "TheEnd" frame it moves to the backup slide – dario Jan 13 '17 at 17:39
• @dario what are you using to view it, and is javascript enabled? I'm now on a machine that doesn't have adobe reader (evince instead) and the javascript is ignored. If I had adobe reader I'd test reducing the "10" in the line with setTimeOut, I'd also test reducing /Dur 0.2. It might be possible to find a sweet spot where a double-tap gets you into the backup slides easily but you don't accidentally press twice too easily. – Chris H Jan 13 '17 at 17:46
• using Adobe Reader XI ... JS seems to be activated – dario Jan 13 '17 at 17:49

This can be achieved using the sub-page navigation feature of the PDF specification. It works in Acrobat Reader DC and requires the Full Screen (Ctrl-L) mode.

Note that the backlinks (GoBack action) from the auxiliary slides are not functional in A-Readers X and XI. GoBack worked in AR-9 and is back in AR-DC, fortunately.

\documentclass{beamer}

\begin{document}

\begin{frame}{Intro}
\end{frame}

\begin{frame}{Slide 1}

\end{frame}

\begin{frame}{Slide 2}

\end{frame}

\begin{frame}{Slide 3}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% In FULL SCREEN mode of Acrobat Reader this code
% doesn't allow the viewer to go past the "Summary" page.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\edef\pdfpageattrSaved{{\the\pdfpageattr}}
\begingroup
\edef\x{\endgroup
\pdfpageattr{%
\the\pdfpageattr
/PresSteps <<
/NA<</S/Named/N/NOP>> %no-op on page open
/Next<<
/NA<</S/GoTo/D (slideSummary)>>
>>
>>
}%
}%
\x
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{Summary}\hypertarget{slideSummary}{}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% reset no normal behaviour
\expandafter\pdfpageattr\pdfpageattrSaved
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{Aux slide 1}\hypertarget{aux1}{}