The method you want is $pdf->getPageContent($pagenum) which returns the decoded stream content. You can either work with that content as plain text, followed perhaps by setPageContent(), or you can get a parsed representation via getPageContentTree().
Chris