change pdf generator behavior