local MyDocument = lpdf.epdf.load("sometext.pdf")
context.starttext()
local pages = MyDocument.pages
local dummy = MyDocument.pages[1] -- we need lua 5.2 in order to
avoid this
local nofpages = #MyDocument.pages
context.starttabulate { "|c|c|c|" }
context.NC() context("page")
context.NC() context("width")
context.NC() context("height") context.NR()
for i=1, nofpages do
local page = pages[i]
local bbox = page.CropBox or page.MediaBox
context.NC() context(i)
context.NC() context(bbox[4]-bbox[2])
context.NC() context(bbox[3]-bbox[1]) context.NR()
end
context.stoptabulate()
context.stoptext()
This code works perfectly, thank you Hans!
Best regards,
Lukas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________