% A4 paper, cut down to width 190mm, height 270mm
\usepackage{tikz}
\setlength{\hoffset}{-25.4mm}
\setlength{\voffset}{-25.4mm}

\setlength{\textheight}{240mm}
\setlength{\textwidth}{171mm}

\setlength{\topmargin}{25mm}
\setlength{\oddsidemargin}{11mm} % inner margin
\setlength{\evensidemargin}{28mm} % 210 - 171 - 11

\setlength{\headheight}{4.5mm}
\setlength{\headsep}{2mm}
\setlength{\footskip}{1.3mm}

\setlength{\marginparsep}{0mm}
\setlength{\marginparwidth}{0mm}

% frames to show logical page extent
% Freme* variant are 2mm vider than the frame* ones,
% give margins for cutting

% for left page of a page spread, verso
\newcommand{\frameVerso}{%
    \begin{tikzpicture}[remember picture,overlay]
      \draw [shift={(current page.south west)}] (20mm,13.5mm) -- ++(0,270mm) -- ++(190mm,0) -- ++(0,-270mm) -- cycle;
   \end{tikzpicture}
}
\newcommand{\FrameVerso}{%
    \begin{tikzpicture}[remember picture,overlay]
      \draw [shift={(current page.south west)}] (18mm,11.5mm) -- ++(0,274mm) -- ++(192mm,0) -- ++(0,-274mm) -- cycle;
   \end{tikzpicture}
}

% for right page of a page spread, recto
\newcommand{\frameRecto}{%
    \begin{tikzpicture}[remember picture,overlay]
      \draw [shift={(current page.south west)}] (0,13.5mm) -- ++(0,270mm) -- ++(190mm,0) -- ++(0,-270mm) -- cycle;
   \end{tikzpicture}
}
\newcommand{\FrameRecto}{%
    \begin{tikzpicture}[remember picture,overlay]
      \draw [shift={(current page.south west)}] (0,11.5mm) -- ++(0,274mm) -- ++(192mm,0) -- ++(0,-274mm) -- cycle;
   \end{tikzpicture}
}

% latex hook so the frames appear on every page
\newcommand{\frameAddToHook}{%
  \AddToHook{shipout/background}{
    \ifodd\value{page}\relax
    \frameRecto
    \else
    \frameVerso
    \fi
  }
}
\newcommand{\FrameAddToHook}{%
  \AddToHook{shipout/background}{
    \ifodd\value{page}\relax
    \FrameRecto
    \else
    \FrameVerso
    \fi
  }
}
