The current implementation of overlay function can only output 1-page pdf, even with multipage pdf as an input.