Create ladder logic pdfs from boolean expressions in either .doc or .txt format using python