![](https://secure.gravatar.com/avatar/02a711d78d02355347d6cff73fda2572.jpg?s=120&d=mm&r=g)
19 Feb
2012
19 Feb
'12
2:50 p.m.
I can't figure out how to determine the number of pages of a PDF file within lua. From the TeX side it works with \getfiguredimensions Can somebody give me a nudge in the right direction? Example: \starttext % Works %\getfiguredimensions [somefile.pdf] \startluacode -- Does not work context.getfiguredimensions({"somefile.pdf"}) local numpages = figures.get("used", "pages", 0) context(numpages) \stopluacode \stoptext Marco