Algorithm for page handling in PDFHandler found! I think.