On 3/4/2025 6:49 PM, Pablo Rodriguez via ntg-context wrote:
Dear list,
I create booklets with the following source:
\setuppapersize[A5, landscape][A4]
\setuparranging[2UP]
\setuplayout[page]
\setuppagenumbering[alternative=doublesided]
\setupinteractionscreen[option={landscape,paper}]
\starttext
\def\Doc{xml-mkiv.pdf}
\getfiguredimensions[\Doc]
\dorecurse{\noffigurepages}
{\externalfigure[\Doc][page=\recurselevel, width=\textwidth]}
\stoptext
In this case, I need to impose the resulting PDF file again:
\setuppapersize[A5, landscape][A4]
\setuparranging[2TOP]
\setuplayout[page]
\setuppagenumbering[alternative=doublesided]
\setupinteractionscreen[option={portrait,paper}]
\starttext
\def\Doc{booklet.pdf}
\getfiguredimensions[\Doc]
\dorecurse{\noffigurepages}
{\externalfigure[\Doc][page=\recurselevel, width=\textwidth]
\externalfigure[\Doc][page=\recurselevel, width=\textwidth]}
\stoptext
Generating this second booklet (from the same PDF document), LMTX
generates a resulting PDF document which is four times bigger than the
one generated by LuaTeX.
In fact, these are the file sizes:
1.2M Mar 4 18:38 xmlpdf-lmtx.pdf
321K Mar 4 18:41 xmlpdf-luatex.pdf
It seems as LMTX was (almost) disabling PDF compression on the second
imposition.
Would anyone be so kind to confirm this issue?
indeed there in the second one compression seems to be turned off for
the included streams
xml-mkiv.pdf 268.614
one.pdf 328,094
two.pdf 1,206,034
after fixing this here (mkxl):
one.pdf 328,093
two.pdf 369,055
btw, --luatex (mkiv) gives:
one.pdf 413.981
two.pdf 499.895
processing xml-mkiv in lmtx actually gives a bit larger file (for good
reasons):
xml-mkiv.pdf 283,611
one.pdf 330,795
two.pdf 373,146
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________