Added pdf images handling (not finished)