Advertisement
jfreak53

5/3 Check Printer Application to use with Latex Check format

Sep 7th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. date=$(zenity --entry --text "Date");
  4. amount=$(zenity --entry --text "Amount for Check");
  5. to=$(zenity --entry --text "The check is made out to");
  6. letters=$(zenity --entry --text "Amount in Letters");
  7.  
  8. rm -f check532.pdf
  9. cp check53.tex check532.tex
  10. sed -i "s,#date,$date," check532.tex
  11. sed -i "s/#amount/$amount/" check532.tex
  12. sed -i "s/#to/$to/" check532.tex
  13. sed -i "s,#letters,$letters," check532.tex
  14.  
  15. pdflatex check532.tex
  16.  
  17. #echo "Please put your check in the printer, right side down."
  18. #read -p "Press any key to print... " -n1 -s
  19. zenity --info --text "Please put your check in the printer, right side down. Then click OK to print."
  20.  
  21. lp -o media=2.75x6 -o landscape check532.pdf
  22. rm -f check532.log check532.pdf check532.aux check532.tex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement