On Sat, 14 Jan 2023 at 10:24, luigi scarso <luigi.scarso@gmail.com> wrote:


On Wed, 11 Jan 2023 at 00:28, Ulrike Fischer <news3@nililand.de> wrote:
In pdftex "if the \pdfpageattr value contains the string /MediaBox,
then pdfTEX omits outputting its own /MediaBox value". That means
that the following produce a PDF with only one /MediaBox in the page
dictionary:

\pdfcompresslevel0
\pdfobjcompresslevel0
\pdfpageattr{/MediaBox [0 0 200 300]}
abc
\bye

The same is not true for luatex:

\pdfvariable compresslevel = 0
\pdfvariable objcompresslevel = 0
\pdfvariable pageattr{/MediaBox [0 0 200 300]}
abc

\bye

leads to two entries (using pdf.setpageattributes gives the same):

/MediaBox [ 0 0 595.276 841.89 ] /MediaBox [0 0 200 300]

Would it be possible to copy the pdftex behaviour also in luatex?

(sorry for the delay...)
Hans and I are talking about it,  parsing here is a bit fragile thing  .


done, 

commit 338157d2e519f45654d56cf5f4f2ffed06c818b1
Author: Luigi Scarso <luigi.scarso@gmail.com>
Date:   Tue Jan 17 02:08:20 2023 +0100

    \pdfvariable omitmediabox 1 (H.Hagen)