I choose width=18cm, height=26cm
in geometry.sty.
If I set the origin at the page center
and positionate a node at (-0.5\textwidth, 0.5\textheight)
I get a gap over the tikzpicture.
How to get rid of that gap.
\documentclass[]{scrartcl}
\usepackage[showframe=true, width=18cm, height=26cm]{geometry}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc, matrix}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[
shift={(current page.center)},
overlay,remember picture,
nodes={inner sep=0pt,outer sep=0pt}
]
\node[
anchor=north west,
draw, red,
minimum width=1.0\textwidth,text width=1.0\textwidth-2mm,
minimum height=6cm,text depth=6cm-4mm,
align=left,
] at (-0.5\textwidth, 0.5\textheight) (Textbox) {ABC};
% Help
\node[blue] at (0,0) {x};
\draw[blue] (0,0) -- (0,0.5\textheight);
\end{tikzpicture}
\end{document}
\draw[blue] (0,0)--(0,-0.5\textheight);
, the line overpasses bottom text border by the same amount which is missing to reach top border. – Ignasi May 27 '20 at 9:46