Skip to main content
KPDF’s save flow exports the current PDF and opens the platform’s save-file picker so the user can choose where to store it. Call requestSave() (or the alias savePdf()) to start the flow. The SDK writes the file once the user selects a destination. Observe saveState to update your UI throughout the process.

Basic save

Suggesting a file name

Pass a suggestedFileName to pre-fill the file name in the platform picker:
savePdf() is an alias for requestSave() with the same parameters — use whichever reads more clearly at your call site.

KPdfSaveState variants

saveState is a StateFlow<KPdfSaveState>. Handle each variant to give users accurate feedback.
Use requestSave when you want the SDK to manage the full save-picker flow. If you need to share the raw bytes with your own share sheet or upload logic, use exportPdf() instead — see Share a PDF.