Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?

Based on your comments above, you are just passing a wrong id or you need to modify delete_pdf_and_metadata function. intval(‘aps_pdf1’) is 0, and that’s why your response is 0!

error code: 523