[Tex/LaTex] Letterhead : How to Position Images in Top Left Corner (Revisit)

graphicsoverlayspositioning

I'm trying to use this exact template, but I'd like a to put a rectangular image in the top left corner ( I can give you the dimension of said rectangle if you need them). I don't know that the graphics package alone will help.

Relevant Information:

*The letter will not be greater than one page.

*The base of the inserted image must have a length as long as the black line in the document.

*The top of this image must be flush with the top of the "John Smith" in the top-right corner.


EDIT(1):

Actually, never mind the black-line criterion because the addresses will be changing, which means the black-line length will be changing too.


EDIT(2):

Here is how to insert the signature

\closing{Sincerely, \\ $\hspace{7cm}$\includegraphics{signature.png}}


EDIT(3):

I have one last question: How can I get rid of the this address with the black line under it? It looks redundant.

Best Answer

To add the image, you can use the fromlogo insert:

\setkomavar{fromlogo}{<contents>}

To get rid of the folding marks, replace

foldmarks=true

with

foldmarks=false

A complete example (depending on your actual image, you might need to adjust some of the lengths used):

% Original author:
% Micha Elmueller (http://micha.elmueller.net/)
\documentclass[
    pagenumber=false, % Removes page numbers from page 2 onwards
    parskip=half, % Separates paragraphs with some whitespace, use parskip=full for more space or comment out to return to default
    fromalign=right, % Aligns the from address to the right
    foldmarks=false, % If "true", prints small fold marks on the left of the page
    addrfield=true, % Set to false to hide the addressee section - you will then want to adjust the height of the body of the letter on the page by adding the following in this section: \makeatletter \@setplength{refvpos}{\useplength{toaddrvpos}} \makeatletter
fromlogo=true
    ]{scrlttr2}

\usepackage[english]{babel} % Explicitly load the babel package to stop an error occurring on some LaTeX installations

\renewcommand*{\raggedsignature}{\raggedright} % Stop the signature from indenting
\usepackage{graphicx}

%----------------------------------------------------------------------------------------
%   YOUR INFORMATION AND LETTER DATE
%----------------------------------------------------------------------------------------

\setkomavar{fromname}{John Smith} % Your name used in the from address
\setkomavar{fromaddress}{123 Broadway \\ City, State 12345} % Your address
\setkomavar{signature}{John Smith} % Your name used in the signature
\setkomavar{fromlogo}{\raisebox{-2pt}{\includegraphics[width=5.84cm,height=1.5cm]{example-image-a}}}

\date{\today} % Date of the letter

%----------------------------------------------------------------------------------------

\begin{document}
%----------------------------------------------------------------------------------------
%   ADDRESSEE
%----------------------------------------------------------------------------------------

\begin{letter}{Director \\ Corporation \\ 123 Pleasant Lane \\ City, State 12345} % Addressee name and address

%----------------------------------------------------------------------------------------
%   LETTER CONTENT
%----------------------------------------------------------------------------------------
%\includeimage[width=5cm,height=2cm]{example-image-a}

\opening{Dear Sir or Madam,}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet tellus vel justo porta et semper libero rutrum. Duis vestibulum sagittis aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac velit eu dolor lobortis fringilla. Quisque imperdiet porta ante in pretium. Maecenas facilisis varius metus et blandit. Proin rhoncus arcu non ante elementum non vehicula sem varius. Morbi feugiat, elit eget tristique posuere, urna eros vestibulum nibh, at tempus neque justo nec enim.

Curabitur id est enim. Suspendisse potenti. Fusce eleifend sodales tortor, a interdum tortor sollicitudin vel. Morbi vel tellus enim, eget hendrerit ligula. Proin molestie suscipit erat, eget consectetur orci convallis at. Ut vestibulum, odio vitae blandit dignissim, dui magna auctor leo, at molestie augue magna sed nisi. Phasellus ipsum magna, fringilla id tempor id, tristique vitae mauris. Maecenas sed orci vel eros consectetur ultrices.

Mauris enim velit, feugiat at venenatis eu, scelerisque vitae mauris. Nullam accumsan facilisis mauris sagittis iaculis. Mauris condimentum dictum libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam consequat malesuada feugiat. Vestibulum tempor commodo turpis id gravida.

\closing{Sincerely,}

\setkomavar*{enclseparator}{Attached} % Change the default "encl:" to "Attached:"
\encl{Copyright permission form} % Attached documents

%----------------------------------------------------------------------------------------

\end{letter}

\end{document}

enter image description here

To remove the from information from the "backadress" and its rule, add

backaddress=off

to the class options, as in

\documentclass[
    pagenumber=false,
    parskip=half,
    fromalign=right,
    foldmarks=false,
    addrfield=true,
    fromlogo=true,
    backaddress=off
]{scrlttr2}