I need two boxes in one line which each contains a text on the left side and a QR code on its right.
As this, I started with:
\documentclass[a4paper]{article}
\usepackage{xcolor}
\usepackage{qrcode}
\begin{document}
\fcolorbox{black}{white}{%
\begin{minipage}[t]{3cm}
\noindent
Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text
\end{minipage}
\hspace{1cm}
\begin{minipage}[t]{2cm}
\qrcode{https://www.wetteronline.de/wetter/duisburg}
\end{minipage}
}
\hfill
\fcolorbox{black}{white}{%
\begin{minipage}[t]{3cm}
\noindent
Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text Some dummy text
\end{minipage}
\hspace{1cm}
\begin{minipage}[t]{2cm}
\qrcode{https://www.wetteronline.de/wetter/duisburg}
\end{minipage}
}
\end{document}
But this generates two problems for me:
The text has a lot of space on top inside each of the boxes. I want the boxes to be filled with the text and the QR code without any additional space on top.
both boxes are places not in a single line, they are placed mid on the page and one at top and one bellow.
Can anyone hint how to place the boxes and remove the unwanted space before the text?
I use pdflatex to create my pdf.

\minipage…\endminipageinstead of\begin{minipage}…\end{minipage}? If you don't want the boxes side by side, why do you add an empty line = new paragraph between them? – cabohah Jun 08 '23 at 10:52\begin{minipage}, also removed the stupied empty line which was really the problem. Thanks. Still open: the space in front of the text inside each of the boxes. – Klaus Jun 08 '23 at 11:01[t]as parameter, but text is still wrong aligned. I didn't catch the point. Need some help again! – Klaus Jun 08 '23 at 11:15\qrcodeis in the middle. So you have to use, e.g., the package recommended in David Z's answer to change the alignment ofminipageand\qrcodeor\raiseboxto move the baseline. – cabohah Jun 08 '23 at 11:18