for the api calling the url
use this
{type: 'application/pdf', disposition: inline; filename=${fileName}}
inline; filename=${fileName}
instead of this
Content-Disposition = 'attachment; filename=filename.pdf'