[luatex] [EXT] Iteration over the dictionary of a stream

Philip Taylor P.Taylor at Rhul.Ac.Uk
Wed Mar 31 17:09:58 CEST 2021

Andreas Matthias wrote:

How do you iterate over the dictionary of a stream?

I know less than nothing about Lua, but the following at least compiles.  It may provide a clue.

% !TeX Program=LuaTeX



   local doc = pdfe.open ('Hoi-An TA menu.pdf')

   local stream = doc.Pages [1].Contents

   % this works

   print (stream.Length)

   % this doesn't

   for k, v in pairs (pdfe.dictionarytotable (doc.Pages [1])) do

   print (k, v)




Philip Taylor

This email, its contents and any attachments are intended solely for the addressee and may contain confidential information. In certain circumstances, it may also be subject to legal privilege. Any unauthorised use, disclosure, or copying is not permitted. If you have received this email in error, please notify us and immediately and permanently delete it. Any views or opinions expressed in personal emails are solely those of the author and do not necessarily represent those of Royal Holloway, University of London. It is your responsibility to ensure that this email and any attachments are virus free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20210331/63f39065/attachment.html>

More information about the luatex mailing list.