duplicated /MediaBox entry if pageattr is used
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? -- Ulrike Fischer http://www.troubleshooting-tex.de/
On Wed, 11 Jan 2023 at 00:28, Ulrike Fischer
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 . -- luigi
On Sat, 14 Jan 2023 at 10:24, luigi scarso
On Wed, 11 Jan 2023 at 00:28, Ulrike Fischer
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
Am Tue, 17 Jan 2023 02:17:14 +0100 schrieb luigi scarso:
Would it be possible to copy the pdftex behaviour also in luatex?
(sorry for the delay...)
No need to excuse or to hurry ;-)
Hans and I are talking about it, parsing here is a bit fragile thing .
Yes, I thought so, and I wouldn't generally recommend to set the MediaBox like that, but it happens and then it is a bit nicer if there is no difference between the engines.
done,
thanks! -- Ulrike Fischer http://www.troubleshooting-tex.de/
participants (2)
-
luigi scarso
-
Ulrike Fischer