The context
I want to computationally generate 1920x1080 PNG images containing text with different styles. Because LaTeX has rich features for styling text and documents can be compiled using the command line (therefore, it is convenient to create scripts), I decided to use LaTeX.
I want to create three areas with the same height arranged vertically and show a sentence in the center of those areas. The following image was created using Inkscape and it shows the result that I'm looking for.
What I've tried
The following minimal working example shows one of my attempts to accomplish the desired result.
\documentclass[aspectratio=169]{beamer}
\setbeamersize{text margin left=0mm,text margin right=0mm}
\setbeamertemplate{navigation symbols}{}
\setbeamercolor{background canvas}{bg=yellow}
\begin{document}
\begin{frame}
\begin{center}
This is a sentence in the first area.
\end{center}
\par\noindent\rule{\textwidth}{1pt}
\begin{center}
This is a sentence in the second area.
\end{center}
\par\noindent\rule{\textwidth}{1pt}
\begin{center}
This is a sentence in the third area.
\end{center}
\end{frame}
\end{document}
The problem with this document is that the three areas are not of the same size and that the sentences are not centered.
What I know
I know that it is possible to create 1920x1080 PNG images from PDF files using convert.
$ convert -quality 100 -density 300 -resize 1920x1080 document.pdf document.png
We can use ffprobe to confirm the desired dimensions.
$ ffprobe -v error -show_entries stream=width,height -print_format default=nw=1 document.png
width=1920
height=1080



