1

I would like to use latex to write cheques as perfect word placement is only possible with it. For this, I would require to do following things

  1. Set page size to cheque size
  2. Write current date in boxes on right top position
  3. Write payee name above a line provided
  4. Put the amount on left side in a box
  5. Expand the amount to word on write side

Does anyone have attempted this. Kindly provide a solution if anyone has. MWE documents placement, but digits need to be expanded to the words. Date should occupy the boxes provided and I should be able to fill this template using csv data data.csv is here

Name, Amount 
John Doe, 1000000

MWE:

\documentclass{memoir}
\usepackage[pageheight= 94mm, pagewidth=195mm]{geometry}
%\setstocksize{94mm}{195mm}
\usepackage{tikz}
\usepackage[utf8]{inputenc}
\newcommand\PlaceText[3]{%
\begin{tikzpicture}[remember picture,overlay]
\node[outer sep=0pt,inner sep=0pt,anchor=south west] 
  at ([xshift=#1,yshift=-#2]current page.north west) {#3};
\end{tikzpicture}%
}

%%number to words \newcommand\majorUnit{Rupees} \newcommand\minorUnit{Paisa} \newcommand\spellOutCurrency[2]{% \NumToName{#1},\majorUnit\ and \NumToName{#2},\minorUnit% } % Load data from csv \usepackage{datatool} % Use custom date format \usepackage{datetime,calc,tokcycle} \Characterdirective{\addcytoks{#1\ }} \newcommand{\customtoday}{\expandedtokcyclexpress {\twodigit{\the\day}\twodigit{\the\month}\the\year}\the\cytoks\unskip}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document} % Load data.csv \DTLloaddb{list}{data.csv} \DTLforeach{list}{% \Name=Name,\Amount=Amount}

{\newpage

\thispagestyle{plain} \PlaceText{15 cm}{0.75 cm}{ \customtoday} \PlaceText{ 2 cm }{ 2 cm }{\Name } \PlaceText{2 cm }{3.5 cm}{\spellOutCurrency{\Amount}{00}} \PlaceText{15 cm}{3.8cm}{\Amount} } \end{document}

Vaibhav
  • 6,625
  • 15
  • 49
  • 76
  • 1
    Please show us what you have tried. – Peter Wilson Feb 10 '22 at 17:25
  • 1
    So you have blank checks and want to fill them out with the help of your printer and LaTeX, is that it? – Ingmar Feb 10 '22 at 17:30
  • 3
    You could use geometry package to set pge size and no margins, use tikz to perfectly position some item on page, and even some package like mailmerge to repeat the cheque output if you have a list of people to give cheques. – Miguel V. S. Frasson Feb 10 '22 at 17:44
  • @Ingmar Yes. I would like to fill the blank cheques. – Vaibhav Feb 11 '22 at 03:49
  • Page size 19.5 cm x 9.4 cm Date starts 15 cm from left margin and 0.5 cm below top margin Payee name starts 2 cm from left and 2 cm from top Amount in words start 3.5 cm below top margin and 2 cm from left margin Amount in digit box lies at 15 cm from left and 3.75 from top My question how do I 1. Start at an exact location 2. How to convert digit to words automatically? – Vaibhav Feb 11 '22 at 04:05
  • 1
    If your printer can handle it (it's probably not all that different from an envelope, in terms of size) it really is pretty much like any other hardcopy form that you want to fill out. This has certainly been attempted before: https://tex.stackexchange.com/questions/6188/ https://tex.stackexchange.com/questions/152079/ https://tex.stackexchange.com/questions/162158/ https://tex.stackexchange.com/questions/168141/ https://tex.stackexchange.com/questions/391875/ – Ingmar Feb 11 '22 at 17:32
  • Please see the MWE @Ingmar – Vaibhav Feb 13 '22 at 04:49

0 Answers0