# The Letter with Digital Stamps

I would like to have the digital post stamp next to the address. for example:

However I don't get a result :(

How can i modify the design of begin{letter}{\Poststamp\RecipientAddress} ?

\documentclass[
fontsize=11pt,
paper=a4,
parskip=half
]{scrlttr2}

\usepackage{graphicx}

\newcommand{\RecipientAddress}{Berliner Rathaus\\Rathausstraße 15\\10178 Berlin}
\newcommand{\Poststamp}{\includegraphics[width=0.2\linewidth]{post1}\\}

\begin{document}
\setkomavar{subject}{Test: Poststamp as Image}
\opening{Hallo,}
Text............. ..
\closing{regards}
\end{letter}
\end{document}


Thanks!

To top-align the image and the address, I place the address in a \Longunderstack and I place the image below the baseline by a value of -\ht\strutbox.

\documentclass[
fontsize=11pt,
paper=a4,
parskip=half
]{scrlttr2}

\usepackage{graphicx}
\usepackage[usestackEOL]{stackengine}

\newcommand{\RecipientAddress}{\Longunderstack[l]{Berliner Rathaus\\Rathausstraße 15\\10178 Berlin}}
\newcommand{\Poststamp}{\belowbaseline[-\ht\strutbox]{%
\includegraphics[width=0.2\linewidth]{1200px-Posthorn_Logo_Dt_Bundespost}}}

\begin{document}
\setkomavar{subject}{Test: Poststamp as Image}
\opening{Hallo,}
Text............. ..
\closing{regards}
\end{letter}
\end{document}


Obtained image from https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Posthorn_Logo_Dt_Bundespost.svg/1200px-Posthorn_Logo_Dt_Bundespost.svg.png and removed the .svg from the name (to avoid confusing LaTeX with the double file extension).

I am using an address block (address input on webpage) on a 'DIN A4 Normalpapier (Einlegeblatt)', which is included as background image with eso-pic. You can either rename the stamp pdf to \jobname_BM or use the optional argument of printstamp. This is perfect for window envelopes!

\documentclass[
fontsize=11pt,
paper=a4,
parskip=half
]{scrlttr2}

\usepackage{graphicx}
\usepackage{eso-pic}
\newcommand\printstamp[1][\jobname_BM]%
{%
{%
\put(0,0)%
{%
\parbox[b][\paperheight]{\paperwidth}%
{%
\vfill%
\centering%
\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#1}%
\vfill%
}%
}%
}%
}%
\begin{document}
\begin{letter}{}
\setkomavar{subject}{Test: Poststamp as Image}
\opening{Hallo,}
\printstamp[stamp]
Text...............
\closing{regards}
\end{letter}
\end{document}


In my case the code is in a dedicated letter class derived from scrlttr2, so in a letter I only need the \KOMAoptions{addrfield=false} and \printstamp macros.

Anonymized ;-) example for the stamp with address block: