Visually defined PDF interpretation in Python