\documentclass[a4paper,oneside]{article} \usepackage[frame]{xy} \usepackage{tabularx} \usepackage[latin1]{inputenc} \setlength{\voffset}{0.4cm} \setlength{\hoffset}{-2.0cm} \setlength{\topmargin}{0cm} \setlength{\headheight}{0.0cm} \setlength{\headsep}{1cm} \setlength{\topskip}{0pt} \setlength{\oddsidemargin}{1.0cm} \setlength{\evensidemargin}{1.0cm} \setlength{\textwidth}{19.2cm} \setlength{\textheight}{24.5cm} \setlength{\footskip}{1cm} \setlength{\parindent}{0pt} \renewcommand{\baselinestretch}{1} \begin{document} \fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont \parbox[t]{12cm}{ <?lsmb company ?> <?lsmb address ?>} \hfill \parbox[t]{6cm}{\hfill <?lsmb source ?>} \vspace*{0.6cm} <?lsmb text_amount ?> \dotfill <?lsmb decimal ?>/100 \makebox[0.5cm]{\hfill} \vspace{0.5cm} \hfill <?lsmb datepaid ?> \makebox[2cm]{\hfill} <?lsmb amount ?> \vspace{0.5cm} <?lsmb name ?> <?lsmb address1 ?> <?lsmb if address2 ?> <?lsmb address2 ?> <?lsmb end address2 ?> <?lsmb city ?> <?lsmb state ?> <?lsmb zipcode ?> <?lsmb if country ?> <?lsmb country ?> <?lsmb end country ?> \vspace{2.8cm} <?lsmb company ?> \vspace{0.5cm} <?lsmb name ?> \hfill <?lsmb datepaid ?> \hfill <?lsmb source ?> \vspace{0.5cm} \begin{tabularx}{\textwidth}{lXrr@{}} \textbf{Invoice No.} & \textbf{Invoice Date} & \textbf{Due} & \textbf{Applied} \\ <?lsmb foreach invnumber ?> <?lsmb invnumber ?> & <?lsmb invdate ?> \dotfill & <?lsmb due ?> & <?lsmb paid ?> \\ <?lsmb end invnumber ?> \end{tabularx} \vfill \end{document}