You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an API endpoint route that calls a server function createOrderPdf, this function uses pdfmake to create a PDF file. And I declare which font to use with this code:
This works well in development but not in production deployed on Vercel. I tried the suggested resolution from the discussion above, but I think SvelteKit and underlying Vite doesn't work the same as Next.js
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Hello, my issue is pretty much the same as in this discussion: https://github.com/orgs/vercel/discussions/1240.
But I'm just not able to fix my issue.
I have an API endpoint route that calls a server function
createOrderPdf
, this function uses pdfmake to create a PDF file. And I declare which font to use with this code:This works well in development but not in production deployed on Vercel. I tried the suggested resolution from the discussion above, but I think SvelteKit and underlying Vite doesn't work the same as Next.js
I've also read these docs: https://vercel.com/guides/how-can-i-use-files-in-serverless-functions But the example from SvelteKit section is not applicable for me, since I need the path of the font file not the content.
Thank you.
Example
No response
Steps to Reproduce
"src/lib/server/pdf/fonts/poppins-v21-latin-ext-regular.ttf"
Beta Was this translation helpful? Give feedback.
All reactions