small code fix in pdf printing