Modify script convertToPdf.py