% !Mode:: "TeX:DE:UTF-8:Main"

% !!!!!!!!!!!!!!!!!
% Obsolete example!
% !!!!!!!!!!!!!!!!
% This test files shows how to add a manual page split.
% It *only* handles the mc-step in the page stream.
% Structure commands and all the related management are not
% involved. So it also only uses activate-mc.

% It is obsolete as the current tagpdf version now handles the
% page split automatically. To keep the example working this is disabled
% below with \csname __tag_mc_disable_marks:\endcsname

\DocumentMetadata{pdfversion=1.7,uncompress}
\documentclass{book}
\usepackage[english,ngerman]{babel}
\usepackage[genericmode]{tagpdf}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{iftex}
\iftutex
   \usepackage{fontspec}
  \usepackage{luacode}
\else
  \usepackage[T1]{fontenc}
\fi

\tagpdfsetup{tabsorder=structure,
             activate-mc,
            }
\newsavebox\mybox

\textheight3cm
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}

\begin{document}
%disable the automatic page break handler:
\csname __tag_mc_disable_marks:\endcsname

\tagmcbegin{tag=P}
Cras egestas ipsum a nisl. Vivamus varius dolor
ut dolor. Fusce vel enim. Pellentesque accumsan ligula et eros. Cras
id lacus non tortor facilisis facilisis. Etiam nisl elit, cursus
sed, fringilla in, congue nec, urna. Cum sociis natoque penatibus et
magnis dis parturient montes, nascetur ridiculus mus. Integer at
turpis. Cum sociis natoque penatibus et magnis dis parturient
montes, nascetur ridiculus mus. Duis fringilla, ligula sed porta
fringilla, ligula wisi commodo felis, ut adipiscing felis dui in
enim. Suspendisse malesuada ultrices ante.%
\vadjust{\tagmcend\pagebreak\tagmcbegin{tag=P}}
Pellentesque scelerisque
augue sit amet urna. Nulla volutpat aliquet tortor. Cras aliquam,
tellus at aliquet pellentesque, justo sapien commodo leo, id rhoncus
sapien quam at erat. Nulla commodo, wisi eget sollicitudin pretium,
orci orci aliquam orci, ut cursus turpis justo et lacus. Nulla vel
tortor. Quisque erat elit, viverra sit amet, sagittis eget, porta
sit amet, lacus.\tagmcend

\end{document}

Comment:

manual tagging at a pagebreak 