working pdf_classes.py - but not cleaned up!

this one is to get the instance working. cleanup is ongoing.