Package media9
is an option.
This example displays latest FIFA news in a Flash-based RSS-Reader I found on the web. It is embedded in the footline of every slide in a beamer presentation. It doesn't seem to update the content, though. However, it is reloaded (with updated content) when moving to the next presentation slide (Acrobat Reader required).
\documentclass{beamer}
\usepackage{media9}
\setbeamertemplate{footline}{
\includemedia[
width=\paperwidth,height=0.1\linewidth,
activate=pageopen, deactivate=pageclose,
flashvars={rss=http://www.fifa.com/rss/index.xml},
url
]{}{http://rsstool.sanriotown.com/rssReader.swf}%
}
\begin{document}
\begin{frame}{Frame title}
Please concentrate on the slide content!
\end{frame}
\end{document}
↗Another example, uses SlideShow.swf
(also media9
) to display a life image loaded from the web.
Package hyperref
2012/10/12 v6.83i now implements the missing calculation order array in the /Form
dictionary for the three driver classes that support PDF forms (pdftex, dvipdfm/xetex, pdfmark/dvips). If a field element contains calculation code, then this field element is automatically added to the calculation order array. Currently only document order is supported.
\documentclass{article}
\usepackage{hyperref}[2012/10/12]
\begin{document}
\begin{Form}
\TextField[maxlen=40,align=2,height=10pt,width=45pt,name=alpha]{Alpha}
\bigskip
\TextField[maxlen=40,align=2,height=10pt,width=45pt,name=beta]{Beta}
\bigskip
\TextField[
maxlen=40,
calculate={%
var f_alpha = this.getField("alpha");
var f_beta = this.getField("beta");
event.value = f_alpha.value + f_beta.value;
},
align=2,height=10pt,width=45pt,name=gamma,readonly=true]{Gamma}
\end{Form}
\end{document}
Update
Since hyperref
2012/10/13 v6.83j the calculation order can be specified, if
pdfTeX is used, from README
:
Field option calculatesortkey
Fields with calculated values are calculated in document order
by default. If calculated field values depend on other calculated
fields that appear later in the document, then the correct calculation
order can be specified with option calculatesortkey
. Its value is
used as key to lexicographically sort the calculated fields.
The sort key do not need to be unique. Fields that share the same
key are sorted in document order.
Currently the field option calculatesortkey
is only supported by
the driver for pdfTeX.
Best Answer
You might try the manual to the
eforms
package.eforms
is another interface (other thanhyperref
) for creating PDF forms in TeX. The manual includes many simple examples.There is no DOM in PDF. If you want parts of the PDF to change based on form events, you pretty much have to make those changing things read-only text fields.
For intermixing JavaScript and your TeX code see this demo of the
insDLJS
packageBoth of the docs (and the packages they document) are written by D.P. Story, who is extremely prolific in this area. His
acrotex
bundle has many more examples.