我正在尝试将二维码(PNG 图像)放在地址或居中标题旁边,位于一页文档的开头。我需要将文档保持在一页大小且易于阅读;更改文本大小和边距是不可接受的。有多种方法可以放置图像而不影响文本,但似乎都行不通,或者根本无法理解。我给出的示例显示了我尝试过的两种无效方法。
\documentclass[a4paper]{article}
\usepackage[top=2cm,bottom=1cm,left=1.5cm, right=1.5cm]{geometry}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{positioning}
\pagenumbering{gobble}
\begin{document}
\pgfdeclarelayer{background}
\pgfdeclarelayer{main}
\pgfsetlayers{background,main}
\begin{tikzpicture}
\begin{pgfonlayer}{background}
\includegraphics[width=2cm,height=2cm]{triffids.png}
\end{pgfonlayer}
\end{tikzpicture}
%\begin{tikzpicture}[remember picture, overlay]
% \node[anchor=north east] (One)
% {\includegraphics[width=1pt]{nothing.png}};
%\end{tikzpicture}
%
%
%\begin{tikzpicture}[remember picture, overlay]
% \node[below=1cm of One] (Two)
% {\includegraphics[width=3cm]{triffids.png}};
%\end{tikzpicture}
\noindent\begin{tabularx}{\pagewidth}{X c X}
{\Large\bfseries{To: Corny Klown University}} & & From: Joe Spigot\\
Attention: Human Resources & & Ornery, Ugly, Enchanting\\
Hiring Manager& & [email protected]\\
\end{tabularx}
\indent To whom it will concern,\\
I am writing to throw my hat, as the saying goes, into the talent pool of professionals clowning around.\\
Blah\\
blah\\
lah\\
ah\\
...
Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
ah\\
...Blah\\
blah\\
lah\\
\begin{center}\emph{Fin.}\end{center}
\end{document}