diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-08-15 00:08:30 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-08-15 00:08:30 +0200 |
commit | b2f0a60af9b448c65f70e2f54f37fc837f26dd7a (patch) | |
tree | 4106fb25d4a2275597db0821cb83c73587588289 /tex/context/base/mkiv/grph-inc.lua | |
parent | 3ac1a4bbf84101cca4e80acb31eb7fc5754248d3 (diff) | |
download | context-b2f0a60af9b448c65f70e2f54f37fc837f26dd7a.tar.gz |
2017-08-15 00:03:00
Diffstat (limited to 'tex/context/base/mkiv/grph-inc.lua')
-rw-r--r-- | tex/context/base/mkiv/grph-inc.lua | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/grph-inc.lua b/tex/context/base/mkiv/grph-inc.lua index 8bf904489..8d6aa5a0b 100644 --- a/tex/context/base/mkiv/grph-inc.lua +++ b/tex/context/base/mkiv/grph-inc.lua @@ -1862,11 +1862,31 @@ end -- end, -- } --- local fig = figures.push { name = pdffile } --- figures.identify() --- figures.check() --- local nofpages = fig.used.pages --- figures.pop() +-- local n = "foo.pdf" +-- local d = figures.getinfo(n) +-- if d then +-- for i=1,d.used.pages do +-- local p = figures.getinfo(n,i) +-- if p then +-- local u = p.used +-- print(u.width,u.height,u.orientation) +-- end +-- end +-- end + +function figures.getinfo(name,page) + if type(name) == "string" then + name = { name = name, page = page } + end + if name.name then + local data = figures.push(name) + figures.identify() + figures.check() + inspect(data) + figures.pop() + return data + end +end -- interfacing |