A optimizer for pdf