basic image and pdf preprocess hooks, some comments