Here's a LaTeX solution using the scrlttr2 class from KOMA-Script, optimized for envelope printing with precise address positioning:
\documentclass[
fontsize=11pt,
parskip=half,
fromalign=right,
fromphone=off,
fromrule=off,
fromemail=off,
firsthead=off,
]{scrlttr2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
% Sender address configuration
\setkomavar{fromname}{Dr. F. Daneshvar}
\setkomavar{fromaddress}{%
Department of Computer Engineering\\
University of Kurdistan\\
Sanandaj, Kurdistan Province\\
Iran
}
% Recipient address configuration
\setkomavar{toaddress}{%
Embassy of Japan\\
No. 10, East Ferdowsi Ave.\\
Tehran 11369\\
Iran
}
% Envelope dimensions and positioning
\setkomavar{firsthead}{} % Remove header
\setkomavar{firstfoot}{} % Remove footer
\@setplength{firstheadvpos}{0mm} % Align to top edge
\@setplength{toaddrvpos}{40mm} % Vertical position for recipient
\@setplength{toaddrheight}{25mm} % Height of recipient box
\@setplength{toaddrhpos}{30mm} % Horizontal position from left
\@setplength{locvpos}{65mm} % Signature vertical position (not used)
\@setplength{lochpos}{0mm} % Signature horizontal position (not used)
\begin{document}
\begin{letter}{}
\KOMAoptions{refline=nodate} % Remove date reference line
\opening{} % Empty opening
\closing{} % Empty closing
\end{letter}
\end{document}
Key features:
- Envelope-specific formatting through KOMA-Script's
scrlttr2 class with precise positioning parameters[1][6]
- Address positioning control using
@setplength commands:
toaddrvpos: Vertical position from top (40mm)
toaddrhpos: Horizontal position from left (30mm)
- Clean layout with headers/footers removed
- Bilingual-ready structure (add
babel package if Farsi/Japanese needed)
Adjustment guide:
- For different envelope sizes, modify the
@setplength values
- Add
\usepackage{polyglossia} for Farsi/Japanese text support
- For window envelopes, use
\@setplength{toaddrhpos} to match window position[1]
- Test print on actual envelope and adjust values incrementally
Important: This generates a single-page document where the addresses appear in the correct positions for direct envelope printing. The empty letter environment and suppressed opening/closing ensure only addresses appear on the page.