Rebuilt pdf to get all references