How do you iterate over the dictionary of a stream? The documentation
says ["The dictionary you can access in the usual way ..."] so I tried
to use pdfe.dictionarytotable() but this didn't work.

\directlua{%
  local doc = pdfe.open('test.pdf')
  local stream =  doc.Pages[1].Contents

  % this works
  print(stream.Length)

  % this doesn't
  for k, v in pairs(pdfe.dictionarytotable(stream)) do
    print(k, v)
  end
}
\bye

Andreas

Reply via email to