[luatex] Iteration over the dictionary of a stream

Andreas Matthias andreas.matthias at gmail.com
Wed Mar 31 16:53:54 CEST 2021

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.

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

  % this works

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


More information about the luatex mailing list.