PDF is a monstruosity. Having the same functionality on it would takes weeks if not months of development. It would be possible to parse a .tex Beamer though.
Check https://github.com/johnwhitington/camlpdf, which does a really good job to parse PDF files properly.