1

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

enter image description here

However I don't get a result :(

enter image description here

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}
    \begin{letter}{\Poststamp\RecipientAddress}
        \setkomavar{subject}{Test: Poststamp as Image}
        \opening{Hallo,}
        Text............. ..
        \closing{regards}
    \end{letter}
\end{document}

Thanks!

1

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}
    \begin{letter}{\RecipientAddress{} \Poststamp}
        \setkomavar{subject}{Test: Poststamp as Image}
        \opening{Hallo,}
        Text............. ..
        \closing{regards}
    \end{letter}
\end{document}

enter image description here

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).

2

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]%
{%
  \AddToShipoutPictureFG*
  {%
    \put(0,0)%
    {%
      \parbox[b][\paperheight]{\paperwidth}%
      {%
        \vfill%
        \centering%
        \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#1}%
        \vfill%
      }%
    }%
  }%
}%
\KOMAoptions{addrfield=false}
\begin{document}
    \begin{letter}{}
        \setkomavar{subject}{Test: Poststamp as Image}
        \opening{Hallo,}
        \printstamp[stamp]
        Text...............
        \closing{regards}
    \end{letter}
\end{document}

letter with stamp pic

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:

stamp with address block

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.