Issue with {{ frappe.call() }} in Print Format for Workflow Email Attachment

The print format with {{ frappe.call() }} works fine in PDF generation and email notifications but not when generating the attachment in the workflow email. Specifically, the function call inside the print format isn’t functioning in the workflow attachment. Any suggestions or solutions for this issue?