Generate PostScript file to print data into cheques.
The printCheque.sh reads a simple profile file to identify the cheque layout and creates a PostScript file with payment details that can be printed into a cheque leaf.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
printCheque.sh [-h] -f profileFile -o outputFile -p Payee -a amount -w Words -d date
-h : Display this help message
-f : Profile file
-o : Output ps file
-s : Print a sample profile file
-p : Payee Name
-a : Amount in figures
-w : Amount in words
-d : Date in dd-mm-yyyy format
The layout of the cheque is read from the sample file. A sample profile can be generated by passing -s option to the script.
The x & y coordinates need to be specified for various elements in the cheque. The PostScript system uses a coordinate system whose origin is on the lower left corner. One inch translates to 72 units. This would mean that the x & y measurements in inches need to be multiplied by 72 to get the coordinates.
Once the PostScript file is generated, ps2pdf utility can be used to convert it to pdf file.
ps2pdf output.ps
To print the pdf file on the cheque leaf, use lpr and change the custom paper size as appropriate.
lpr -o PageSize=Custom.9x20cm out.pdf