Deleting a generated PDF

Hi,

I am using aspose.pdf.kit in my project. It is mainly to read a pdf template and fill the fields and display the content of the filled form on the browser. I also save the form before sending the content of saved form to the browser. Is there any way after sending the content of the pdf I can delete the saved pdf ?

Regards

Jain

Hello Jain,

Thanks for considering Aspose.

You can use following code line to delete the pdf file.

System.IO.File.Delete(PdfFilePath);

Hi Nayyer,

I tried this line but still the pdf exists, it is not getting deleted.

Regards

Jain

Hello Jain,

I am not sure why it is not deleting the file. Please share the code with us, and also the sample resource files, so that we can test the issue at our end.