const url = window.URL.createObjectURL(
new Blob([pdf], {type: 'application/pdf'}),
);
const link = document.createElement('a');
link.href = url;
link.setAttribute(
'download',
`shipping_labels.pdf`,
);
document.body.appendChild(link);
link.click();
link.parentNode?.removeChild(link);
I am trying to get a string PDF to download automatically, though in converting it to a blob it loses its existing font families; when testing the endpoint that returns the string PDF via Postman, it downloads correctly. How can I retain the font families?