checks whether existing pdf exist before create the new pdf.