show pdf on edit function