Update PageBreak.php

Update pdf-generation; check if we're generating a pdf