Skip to content

primejyothi/chequePrint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

printCheque.sh

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.

Running printCheque.sh

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 Profile File

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

About

Generate PostScript file to print data into cheques

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages