Skip to main content

Generate PDF and store physical on the server

I ask if there is anyway to generate PDF and store physical on the server on custom path like /wp-content/uploads/pdf/ and with custom file name like submition_id + user_email , And insert the path link into custom meta key CPT, Also when i delete the entries not delete the PDF file

Now the link is showing like that:
/wp-admin/admin-ajax.php?action=fluentform_pdf_download_public&submission_id=cWM3VnRZaGphUml1WGN1Y1M1cDR3Y2VEQ2dpWXJqdGhmNmgzZ3ViUXN3aHJDQkZUejhGREVRUHpkWEJROWRuVFh1dFpsTXdCM0xkejhydkh4Y1F2bUE9PQ==&id=Q0R3eGR4bVF0RHorTWJjdm1PQlptTHJSb2doRkt4ZVJKVjd5anhoblJWNEk3UmZJd3RpY3Jva0p6dURYdVdwSlRnSzF2Sk5vdHA4bjd5azYxMGpEUEE9PQ==

I need the link and path to be like that:
{wp.site_url}/wp-content/uploads/pdf/{submissionid}+{user__email}.pdf