3

Package geometry allows specification of paper height, e.g., \geometry{paperheight=782mm},

What about dynamically adjusting paper height — How to dynamically increase paper height, rather than breaking pages?

LaTeX has page breaking logic, tweak to increase paper height by length necessary to avoid break.

bs-
  • 41

1 Answers1

1

Observing 16383pt limit on page height

\usepackage{geometry}
\geometry{paperwidth=174mm,paperheight=16383pt,margin=8mm}            

dynamically increase when attempting page break

\usepackage{everyshi}
\EveryShipout{%
    \pdfpageheight=\pagetotal
    \advance\pdfpageheight by 16mm %top and bottom margin
    \advance\pdfpageheight by \textheight
    \advance\pdfpageheight by -\pagegoal
}

(Variant of https://tex.stackexchange.com/a/49712/300519 for my purposes.)

bs-
  • 41