[pdftex] Open in Full-Screen mode

James Quirk jjq at galcit.caltech.edu
Wed Sep 20 04:16:17 CEST 2006


On Wed, 20 Sep 2006, Ross Moore wrote:

> 
> Hi all,
> 
> I want to set a PDF document to open in Full-Screen and playing
> as a slideshow with a 10-second interval.
> 
> What is the correct way to do this, using  pdfLaTeX + hyperref ?
> 
> Certainly the hyperref option:    pdfpagemode=FullScreen
> does part of this.
Ross,

You could use:

\documentclass{article}
\usepackage[pdfpagemode=FullScreen,pdfstartview={}]{hyperref}
\pdfcatalog {
   /OpenAction <<
      /S /JavaScript /JS (
         var fs = app.fs;
         fs.timeDelay     = 4;
         fs.loop          = true;
         fs.useTimer      = true;
         fs.usePageTiming = true;
      )
   >>
}

\begin{document}
   slide 1 \newpage
   slide 2 \newpage
   slide 3 \newpage
   slide 4 \newpage
   slide 5 \newpage
\end{document}

But on my platform the settings for the fullscreen object 
are permament i.e. they apply to all future documents,
which is probably not what you want. Therefore another
approach to try is:

\documentclass{article}
\usepackage[pdfpagemode=FullScreen,pdfstartview={}]{hyperref}
\pdfcatalog {
   /OpenAction <<
      /S /JavaScript /JS (
         function BumpSlide() {
            if(this.pageNum == (this.numPages-1)) {
               this.pageNum = 0;
            }
            else
               this.pageNum++;
         }
         var nsecs = 10;
         var hdl   = app.setInterval("BumpSlide()",nsecs*1000);
      )
   >>
}

\begin{document}
   slide 1 \newpage
   slide 2 \newpage
   slide 3 \newpage
   slide 4 \newpage
   slide 5 \newpage
\end{document}

which has the advantage that it applies only to the current document.

James


More information about the pdftex mailing list