I developed the following code for my document:
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[headsepline,footsepline]{scrlayer-scrpage}
\usepackage{graphicx,xcolor}
\usepackage[margin=38mm,includeheadfoot,head=32pt]{geometry}
\usepackage{setspace, fontspec, hyperref, lastpage}
\usepackage[acronym]{glossaries}
\pagenumbering{arabic}
\onehalfspacing
\frenchspacing
\renewcommand{\headfont}{\normalfont}
\DeclareNewLayer[
background,
topmargin,
mode=picture,
contents={\includegraphics[height=\layerheight,width=\layerwidth]{Picture}}
]{top}
\DeclareNewLayer[
background,
bottommargin,
mode=picture,
contents={\includegraphics[height=\layerheight,width=\layerwidth]{Picture}}
]{bottom}
\DeclarePageStyleByLayers{Titlepage}{top,bottom}
\newpairofpagestyles[scrheadings]{Tableofcontents}
{
\clearpairofpagestyles
\ihead{Lorem ipsum}
\chead{Lorem ipsum}
\ohead{Lorem ipsum}
}
\newpairofpagestyles[scrheadings]{Content}
{
\clearpairofpagestyles
\ihead{Lorem ipsum}
\chead{Lorem ipsum}
\ohead{Lorem ipsum}
\cfoot{\pagemark}
}
\renewcommand*{\pagemark}{{\usekomafont{pagenumber}Page~\thepage}}
\newcommand*{\Content}{
\cleardoublepage
\pagenumbering{arabic}
\pagestyle{Content}
}
\makeglossaries
\begin{document}
\pagenumbering{roman}
\KOMAoption{headsepline}{false}
\KOMAoption{footsepline}{false}
Titlepage
\newpage
\newgeometry{left=2.5cm,right=2cm,top=2cm,bottom=2cm}
\setlength{\headsep}{10pt}
\KOMAoption{headsepline}{true}
\KOMAoption{footsepline}{true}
\Content
Lorem ipsum
\printglossary[type=\acronymtype]
\printglossary
\end{document}
Now I printed the document and the document margins don't have the size, that I have defined in '\newgeometry'. Instead of: left=2.5cm, right=2cm, top=2cm, bottom=2cm the real margins on the paper are: left=2.8cm, right=2.3cm, top=1.4cm, bottom=2.6cm. So somehow the margins are definitely not correct. I'm happy about every suggestion to solve this problem.
EDIT: Please compile with the XeLaTeX-Compiler.