Hope you are doing well and thanks for reaching out.
Would you mind elaborating a bit more about the issue you are experiencing? Do you want to delete the document during the conversion process or after it being converted to PDF?
What is the workflow/steps you are taking to convert the document to PDF? A small video recording of the steps you are taking would be very helpful for more clarity.