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

Andreas Matthias andreas.matthias at gmail.com
Wed Mar 31 17:41:48 CEST 2021


On Wed, Mar 31, 2021 at 5:10 PM Philip Taylor <P.Taylor at rhul.ac.uk> wrote:
>
>    for k, v in pairs (pdfe.dictionarytotable (doc.Pages [1])) do

Here, you are iterating over a /Page dictionary (doc.Pages[1]), which
is a real dictionary.
No issues when iterating over real dictionaries with pdfe.dictionarytotable().

But the /Contents entry of this dictionary refers to a stream. And the
first part of
a stream object is a dictionary. But you cannot use pdfe.dictionarytotable() in
this case.

Andreas


More information about the luatex mailing list.