add some comments to pdf.py