Bugfix: handling pdfs with multiple pages.