Answer
Append the desired filename (including its .pdf extension) as an additional segment inside the same '###'-delimited attach_ string, after the existing archive ID, print job ID, and result key segments — for example: attach_ := '###'||Pdf_Archive_API.Get_Id(result_key_,print_job_id_)||'###'||to_char(print_job_id_)||'###'||to_char(result_key_)||'###'||your_desired_filename_||'.pdf'||'###'. The '###' delimiters are required around each segment (removing them breaks the mechanism entirely), and adding your filename as its own segment within that same structure is what actually controls the attachment's filename.