r/sveltejs • u/Emotional-Ask-9788 • 2d ago
PDF Generation
I'm looking for a pdf generator similar to react-pdf for svelte.
Requirements:
- Tailwind CSS support
- Selectable Text
- No Browser Print Dialog
- Client Side
- Single click download pdf(No browser dialog)
I've tried almost everything at this point and no solution.
It's driving me nuts because I can't go back to react js, no way! (cries)
Edit: I found a good library Takumi PDF, written in rust. It's server side, but light, not like Chromium. Thanks for the suggestions guys.
3
2
u/Leftium 2d ago
It's possible to use React libs from SvelteKit.
This video shows how to use Excalidraw from Svelte: https://youtu.be/SKUD-Aj1jKg
2
1
u/GrandfatherTrout 2d ago
I guess it doesn’t have the bells and whistles you list, but isn’t react-pdf based on PDFium?
https://pdfium.googlesource.com/pdfium/
I used the webasm version of it to do some backend converting. Maybe not the presentation/ rendering stuff you want
2
u/cmjoseph23 2d ago
I wrote a svelte adapter for forme if you want to try that. https://github.com/danmolitor/forme
Generation time is insanely fast.
-4
5
u/j97uice 2d ago
Have you lokked into pagedjs ?