added better (batch) handling of multipdfs