ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] LMTX/LuaTeX: much bigger output size in imposition
@ 2025-03-04 17:49 Pablo Rodriguez via ntg-context
  2025-03-05  8:44 ` [NTG-context] " Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-03-04 17:49 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

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?

Many thanks for your help,

Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: LMTX/LuaTeX: much bigger output size in imposition
  2025-03-04 17:49 [NTG-context] LMTX/LuaTeX: much bigger output size in imposition Pablo Rodriguez via ntg-context
@ 2025-03-05  8:44 ` Hans Hagen
  2025-03-05 15:20   ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2025-03-05  8:44 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: LMTX/LuaTeX: much bigger output size in imposition
  2025-03-05  8:44 ` [NTG-context] " Hans Hagen
@ 2025-03-05 15:20   ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-03-05 15:20 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 3/5/25 09:44, Hans Hagen wrote:
> [...]
> indeed there in the second one compression seems to be turned off for
> the included streams
> [...]
> after fixing this here (mkxl):

Many thanks for the fix, Hans.

Would it be possible to have the patch before the new release?

Many thanks for your help,

Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-05 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-04 17:49 [NTG-context] LMTX/LuaTeX: much bigger output size in imposition Pablo Rodriguez via ntg-context
2025-03-05  8:44 ` [NTG-context] " Hans Hagen
2025-03-05 15:20   ` Pablo Rodriguez via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).